code/pages/WikiPage.php
public function save($data, $form) {
		if (!$this->data()->canEdit()) {
			return Security::permissionFailure($this);
		}

		$existing = $this->getEditingLocks($this->data(), true);
		// oops, we've somehow got here even though we shouldn't have
		if ($existing && $existing['user'] != Member::currentUser()->Email) {
			return "Someone somehow locked it while you were gone, this shouldn't happen like this :(";
		}

		$this->savePage($this->data(), $form);
		if (WikiPage::$auto_publish) {
			// do publish
			$this->data()->doPublish();
		}

		return $this->redirect($this->data()->Link('edit') . '?stage=Stage');
	}
public function save($data, $form) {
		if (!$this->data()->canEdit()) {
			return Security::permissionFailure($this);
		}

		$existing = $this->getEditingLocks($this->data(), true);
		// oops, we've somehow got here even though we shouldn't have
		if ($existing && $existing['user'] != Member::currentUser()->Email) {
			return "Someone somehow locked it while you were gone, this shouldn't happen like this :(";
		}

		$this->savePage($this->data(), $form);
		if (WikiPage::$auto_publish) {
			// do publish
			$this->data()->doPublish();
		}

		return $this->redirect($this->data()->Link('edit') . '?stage=Stage');
	}
public function save ( $ data , $ form ) { if ( ! $ this -> data ( ) -> canEdit ( ) ) { return Security :: permissionFailure ( $ this ) ; } $ existing = $ this -> getEditingLocks ( $ this -> data ( ) , true ) ; // oops, we've somehow got here even though we shouldn't have if ( $ existing && $ existing [ 'user' ] != Member :: currentUser ( ) -> Email ) { return "Someone somehow locked it while you were gone, this shouldn't happen like this :(" ; } $ this -> savePage ( $ this -> data ( ) , $ form ) ; if ( WikiPage :: $ auto_publish ) { // do publish $ this -> data ( ) -> doPublish ( ) ; } return $ this -> redirect ( $ this -> data ( ) -> Link ( 'edit' ) . '?stage=Stage' ) ; }
Save the submitted data

@return
Save the submitted data