- /**
- * This can be either formed or formless depending on the session token given
- */
- public function show() {
- $this->setHeaders();
-
- $user = $this->getUser();
- // This will throw exceptions if there's a problem
- $this->checkCanExecute( $user );
-
- // Must have valid token for this action/title
- $salt = array( $this->getName(), $this->getTitle()->getPrefixedDBkey() );
-
- if ( $user->matchEditToken( $this->getRequest()->getVal( 'token' ), $salt ) ) {
- $this->onSubmit( array() );
- $this->onSuccess();
- } else {
- $form = $this->getForm();
- if ( $form->show() ) {
- $this->onSuccess();
- }
- }
- }
-