- public function render() {
- global $wgOut;
-
- $wgOut->setArticleBodyOnly( true );
- $this->view();
- }
-
- /**
- * Handle action=purge
- */
- public function purge() {
- return Action::factory( 'purge', $this )->show();
- }
-
- /**
- * Mark this particular edit/page as patrolled
- * @deprecated since 1.18
- */
- public function markpatrolled() {
- Action::factory( 'markpatrolled', $this )->show();
- }
-
- /**
- * User-interface handler for the "watch" action.
- * Requires Request to pass a token as of 1.18.
- * @deprecated since 1.18
- */
- public function watch() {
- Action::factory( 'watch', $this )->show();
- }
-
- /**
- * Add this page to $wgUser's watchlist
- *
- * This is safe to be called multiple times
- *
- * @return bool true on successful watch operation
- * @deprecated since 1.18
- */
- public function doWatch() {
- global $wgUser;
- return WatchAction::doWatch( $this->getTitle(), $wgUser );
- }
-
- /**
- * User interface handler for the "unwatch" action.
- * Requires Request to pass a token as of 1.18.
- * @deprecated since 1.18
- */
- public function unwatch() {
- Action::factory( 'unwatch', $this )->show();
- }
-
- /**
- * Stop watching a page
- * @return bool true on successful unwatch
- * @deprecated since 1.18
- */
- public function doUnwatch() {
- global $wgUser;
- return WatchAction::doUnwatch( $this->getTitle(), $wgUser );
- }
-
- /**
- * action=protect handler
- */
- public function protect() {
- $form = new ProtectionForm( $this );
- $form->execute();
- }
-
- /**
- * action=unprotect handler (alias)
- */
- public function unprotect() {
- $this->protect();
- }
-
- /**
- * Info about this page
- * Called for ?action=info when $wgAllowPageInfo is on.
- */
- public function info() {
- Action::factory( 'info', $this )->show();
- }
-
- /**
- * Overriden by ImagePage class, only present here to avoid a fatal error
- * Called for ?action=revert
- */
- public function revert() {
- Action::factory( 'revert', $this )->show();
- }
-
- /**
- * User interface for rollback operations
- */
- public function rollback() {
- Action::factory( 'rollback', $this )->show();
- }
-
- /**
- * Output a redirect back to the article.
- * This is typically used after an edit.
- *
- * @deprecated in 1.18; call $wgOut->redirect() directly
- * @param $noRedir Boolean: add redirect=no
- * @param $sectionAnchor String: section to redirect to, including "#"
- * @param $extraQuery String: extra query params
- */
- public function doRedirect( $noRedir = false, $sectionAnchor = '', $extraQuery = '' ) {
- wfDeprecated( __METHOD__ );
- global $wgOut;
-
- if ( $noRedir ) {
- $query = 'redirect=no';
- if ( $extraQuery )
- $query .= "&$extraQuery";
- } else {
- $query = $extraQuery;
- }
-
- $wgOut->redirect( $this->getTitle()->getFullURL( $query ) . $sectionAnchor );
- }
-
- /**
- * UI entry point for page deletion
- */
- public function delete() {
- global $wgOut, $wgRequest;
-
- $confirm = $wgRequest->wasPosted() &&
- $this->getContext()->getUser()->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) );
-
- $this->DeleteReasonList = $wgRequest->getText( 'wpDeleteReasonList', 'other' );
- $this->DeleteReason = $wgRequest->getText( 'wpReason' );