Merged in changes from Liquid Threads branch including extra hooks and minor changes...
authorDavid McCabe <david@users.mediawiki.org>
Fri, 12 Oct 2007 23:12:24 +0000 (23:12 +0000)
committerDavid McCabe <david@users.mediawiki.org>
Fri, 12 Oct 2007 23:12:24 +0000 (23:12 +0000)
includes/ChangesList.php
includes/EditPage.php
includes/Linker.php
includes/OutputPage.php
includes/Parser.php
includes/SpecialPage.php
includes/SpecialWatchlist.php
includes/Title.php
includes/Wiki.php

index 8d0f950..617e12e 100644 (file)
@@ -176,6 +176,9 @@ class ChangesList {
                global $wgContLang;
                $articlelink .= $wgContLang->getDirMark();
 
+               wfRunHooks('ChangesListInsertArticleLink',
+                       array(&$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched));
+               
                $s .= ' '.$articlelink;
        }
 
index ad5c759..276d7c4 100644 (file)
@@ -42,10 +42,14 @@ class EditPage {
        # extensions should take care to _append_ to the present value
        public $editFormPageTop; // Before even the preview
        public $editFormTextTop;
+       public $editFormTextBeforeContent;
        public $editFormTextAfterWarn;
        public $editFormTextAfterTools;
        public $editFormTextBottom;
 
+       public $didSave = false;
+       public $suppressIntro = false;
+
        /**
         * @todo document
         * @param $article
@@ -58,6 +62,7 @@ class EditPage {
                # Placeholders for text injection by hooks (empty per default)
                $this->editFormPageTop =
                $this->editFormTextTop =
+               $this->editFormTextBeforeContent =
                $this->editFormTextAfterWarn =
                $this->editFormTextAfterTools =
                $this->editFormTextBottom = "";
@@ -78,10 +83,10 @@ class EditPage {
                wfProfileIn( __METHOD__ );
 
                $text = '';
-               if( !$this->mTitle->exists() ) {
-                       if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+               if( !$this->mArticle->getTitle()->exists() ) {
+                       if ( $this->mArticle->getTitle()->getNamespace() == NS_MEDIAWIKI ) {
                                # If this is a system message, get the default text. 
-                               $text = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
+                               $text = wfMsgWeirdKey ( $this->mArticle->getTitle()->getText() ) ;
                        } else {
                                # If requested, preload some text.
                                $text = $this->getPreloadedText( $preload );
@@ -318,9 +323,9 @@ class EditPage {
                        return;
                }
 
-               $permErrors = $this->mTitle->getUserPermissionsErrors('edit', $wgUser);
-               if( !$this->mTitle->exists() )
-                       $permErrors += array_diff( $this->mTitle->getUserPermissionsErrors('create', $wgUser), $permErrors );
+               $permErrors = $this->mArticle->getTitle()->getUserPermissionsErrors('edit', $wgUser);
+               if( !$this->mArticle->getTitle()->exists() )
+                       $permErrors += array_diff( $this->mArticle->getTitle()->getUserPermissionsErrors('create', $wgUser), $permErrors );
 
                # Ignore some permissions errors.
                $remove = array();
@@ -372,8 +377,8 @@ class EditPage {
 
                $this->isConflict = false;
                // css / js subpages of user pages get a special treatment
-               $this->isCssJsSubpage      = $wgTitle->isCssJsSubpage();
-               $this->isValidCssJsSubpage = $wgTitle->isValidCssJsSubpage();
+               $this->isCssJsSubpage      = $this->mArticle->getTitle()->isCssJsSubpage();
+               $this->isValidCssJsSubpage = $this->mArticle->getTitle()->isValidCssJsSubpage();
 
                /* Notice that we can't use isDeleted, because it returns true if article is ever deleted
                 * no matter it's current state
@@ -385,7 +390,7 @@ class EditPage {
                         * deletes. This is done on every preview and save request. Move it further down
                         * to only perform it on saves
                         */
-                       if ( $this->mTitle->isDeleted() ) {
+                       if ( $this->mArticle->getTitle()->isDeleted() ) {
                                $this->lastDelete = $this->getLastDelete();
                                if ( !is_null($this->lastDelete) ) {
                                        $deletetime = $this->lastDelete->log_timestamp;
@@ -400,7 +405,7 @@ class EditPage {
                if( $this->formtype == 'initial' || $this->firsttime )
                        $this->showIntro();
        
-               if( $this->mTitle->isTalkPage() ) {
+               if( $this->mArticle->getTitle()->isTalkPage() ) {
                        $wgOut->addWikiText( wfMsg( 'talkpagetext' ) );
                }
 
@@ -426,8 +431,8 @@ class EditPage {
                                wfProfileOut( $fname );
                                return;
                        }
-                       if( !$this->mTitle->getArticleId() ) 
-                               wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) );
+                       if( !$this->mArticle->getID() ) 
+                               wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mArticle->mTitle ) );
                }
 
                $this->showEditForm();
@@ -442,6 +447,7 @@ class EditPage {
         */
        private function previewOnOpen() {
                global $wgRequest, $wgUser;
+               $title = $this->mArticle->getTitle();
                if( $wgRequest->getVal( 'preview' ) == 'yes' ) {
                        // Explicit override from request
                        return true;
@@ -451,10 +457,10 @@ class EditPage {
                } elseif( $this->section == 'new' ) {
                        // Nothing *to* preview for new sections
                        return false;
-               } elseif( ( $wgRequest->getVal( 'preload' ) !== '' || $this->mTitle->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) {
+               } elseif( ( $wgRequest->getVal( 'preload' ) !== '' || $title->exists() ) && $wgUser->getOption( 'previewonfirst' ) ) {
                        // Standard preference behaviour
                        return true;
-               } elseif( !$this->mTitle->exists() && $this->mTitle->getNamespace() == NS_CATEGORY ) {
+               } elseif( !$title->exists() && $title->getNamespace() == NS_CATEGORY ) {
                        // Categories are special
                        return true;
                } else {
@@ -531,7 +537,7 @@ class EditPage {
                        $this->watchthis = $request->getCheck( 'wpWatchthis' );
 
                        # Don't force edit summaries when a user is editing their own user or talk page
-                       if( ( $this->mTitle->mNamespace == NS_USER || $this->mTitle->mNamespace == NS_USER_TALK ) && $this->mTitle->getText() == $wgUser->getName() ) {
+                       if( ( $this->mArticle->getTitle()->mNamespace == NS_USER || $this->mArticle->getTitle()->mNamespace == NS_USER_TALK ) && $this->mArticle->getTitle()->getText() == $wgUser->getName() ) {
                                $this->allowBlankSummary = true;
                        } else {
                                $this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
@@ -587,7 +593,8 @@ class EditPage {
         */
        private function showIntro() {
                global $wgOut, $wgUser;
-               if( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
+               if ( $this->suppressIntro ) return;
+               if( !$this->showCustomIntro() && !$this->mArticle->getTitle()->exists() ) {
                        if( $wgUser->isLoggedIn() ) {
                                $wgOut->addWikiText( wfMsg( 'newarticletext' ) );
                        } else {
@@ -648,7 +655,7 @@ class EditPage {
                        wfProfileOut( $fname );
                        return false;
                }
-               if ( $wgFilterCallback && $wgFilterCallback( $this->mTitle, $this->textbox1, $this->section ) ) {
+               if ( $wgFilterCallback && $wgFilterCallback( $this->mArticle->getTitle(), $this->textbox1, $this->section ) ) {
                        # Error messages or other handling should be performed by the filter function
                        wfProfileOut( $fname );
                        wfProfileOut( "$fname-checks" );
@@ -720,11 +727,11 @@ class EditPage {
                wfProfileOut( "$fname-checks" );
 
                # If article is new, insert it.
-               $aid = $this->mTitle->getArticleID( GAID_FOR_UPDATE );
+               $aid = $this->mArticle->getTitle()->getArticleID( GAID_FOR_UPDATE );
                if ( 0 == $aid ) {
 
                        // Late check for create permission, just in case *PARANOIA*
-                       if ( !$this->mTitle->userCan( 'create' ) ) {
+                       if ( !$this->mArticle->getTitle()->userCan( 'create' ) ) {
                                wfDebug( "$fname: no create permission\n" );
                                $this->noCreatePermission();
                                wfProfileOut( $fname );
@@ -741,6 +748,7 @@ class EditPage {
                        $isComment=($this->section=='new');
                        $this->mArticle->insertNewArticle( $this->textbox1, $this->summary,
                                $this->minoredit, $this->watchthis, false, $isComment);
+                       $this->didSave = true;
 
                        wfProfileOut( $fname );
                        return false;
@@ -878,6 +886,7 @@ class EditPage {
                # update the article here
                if( $this->mArticle->updateArticle( $text, $this->summary, $this->minoredit,
                        $this->watchthis, '', $sectionanchor ) ) {
+                       $this->didSave = true;
                        wfProfileOut( $fname );
                        return false;
                } else {
@@ -897,8 +906,8 @@ class EditPage {
                $this->textbox1 = $this->getContent(false);
                if ($this->textbox1 === false) return false;
 
-               if ( !$this->mArticle->exists() && $this->mArticle->mTitle->getNamespace() == NS_MEDIAWIKI )
-                       $this->textbox1 = wfMsgWeirdKey( $this->mArticle->mTitle->getText() );
+               if ( !$this->mArticle->exists() && $this->mArticle->getTitle()->getNamespace() == NS_MEDIAWIKI )
+                       $this->textbox1 = wfMsgWeirdKey( $this->mArticle->getTitle()->getText() );
                wfProxyCheck();
                return true;
        }
@@ -1007,12 +1016,12 @@ class EditPage {
                        }
                }
 
-               if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+               if( $this->mArticle->getTitle()->getNamespace() == NS_MEDIAWIKI ) {
                        # Show a warning if editing an interface message
                        $wgOut->addWikiText( wfMsg( 'editinginterface' ) );
-               } elseif( $this->mTitle->isProtected( 'edit' ) ) {
+               } elseif( $this->mArticle->getTitle()->isProtected( 'edit' ) ) {
                        # Is the title semi-protected?
-                       if( $this->mTitle->isSemiProtected() ) {
+                       if( $this->mArticle->getTitle()->isSemiProtected() ) {
                                $notice = wfMsg( 'semiprotectedpagewarning' );
                                if( wfEmptyMsg( 'semiprotectedpagewarning', $notice ) || $notice == '-' )
                                        $notice = '';
@@ -1022,9 +1031,9 @@ class EditPage {
                        }
                        $wgOut->addWikiText( $notice );
                }
-               if ( $this->mTitle->isCascadeProtected() ) {
+               if ( $this->mArticle->getTitle()->isCascadeProtected() ) {
                        # Is this page under cascading protection from some source pages?
-                       list($cascadeSources, /* $restrictions */) = $this->mTitle->getCascadeProtectionSources();
+                       list($cascadeSources, /* $restrictions */) = $this->mArticle->getTitle()->getCascadeProtectionSources();
                        if ( count($cascadeSources) > 0 ) {
                                # Explain, and list the titles responsible
                                $notice = wfMsgExt( 'cascadeprotectedwarning', array('parsemag'), count($cascadeSources) ) . "\n";
@@ -1090,10 +1099,10 @@ class EditPage {
                        if( $wgUser->getOption( 'watchdefault' ) ) {
                                # Watch all edits
                                $this->watchthis = true;
-                       } elseif( $wgUser->getOption( 'watchcreations' ) && !$this->mTitle->exists() ) {
+                       } elseif( $wgUser->getOption( 'watchcreations' ) && !$this->mArticle->getTitle()->exists() ) {
                                # Watch creations
                                $this->watchthis = true;
-                       } elseif( $this->mTitle->userIsWatching() ) {
+                       } elseif( $this->mArticle->getTitle()->userIsWatching() ) {
                                # Already watched
                                $this->watchthis = true;
                        }
@@ -1125,12 +1134,12 @@ class EditPage {
                if( $this->section == 'new' ) {
                        $commentsubject="<span id='wpSummaryLabel'><label for='wpSummary'>{$subject}:</label></span>\n<div class='editOptions'>\n<input tabindex='1' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' /><br />";
                        $editsummary = '';
-                       $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
+                       $subjectpreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('subject-preview').':'.$sk->commentBlock( $this->summary, $this->mArticle->getTitle() )."</div>\n" : '';
                        $summarypreview = '';
                } else {
                        $commentsubject = '';
                        $editsummary="<span id='wpSummaryLabel'><label for='wpSummary'>{$summary}:</label></span>\n<div class='editOptions'>\n<input tabindex='2' type='text' value=\"$summarytext\" name='wpSummary' id='wpSummary' maxlength='200' size='60' /><br />";
-                       $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mTitle )."</div>\n" : '';
+                       $summarypreview = $summarytext && $this->preview ? "<div class=\"mw-summary-preview\">".wfMsg('summary-preview').':'.$sk->commentBlock( $this->summary, $this->mArticle->getTitle() )."</div>\n" : '';
                        $subjectpreview = '';
                }
 
@@ -1203,6 +1212,7 @@ END
 $recreate
 {$commentsubject}
 {$subjectpreview}
+{$this->editFormTextBeforeContent}
 <textarea tabindex='1' accesskey="," name="wpTextbox1" id="wpTextbox1" rows='{$rows}'
 cols='{$cols}'{$ew} $hidden>
 END
@@ -1272,7 +1282,7 @@ END
                if ( $this->isConflict ) {
                        $wgOut->addWikiText( '==' . wfMsg( "yourdiff" ) . '==' );
 
-                       $de = new DifferenceEngine( $this->mTitle );
+                       $de = new DifferenceEngine( $this->mArticle->getTitle() );
                        $de->setText( $this->textbox2, $this->textbox1 );
                        $de->showDiff( wfMsg( "yourtext" ), wfMsg( "storedversion" ) );
 
@@ -1309,12 +1319,12 @@ END
                global $wgOut;
 
                $wgOut->addHTML( '<div id="wikiPreview">' );
-               if($this->mTitle->getNamespace() == NS_CATEGORY) {
+               if($this->mArticle->getTitle()->getNamespace() == NS_CATEGORY) {
                        $this->mArticle->openShowCategory();
                }
                wfRunHooks( 'OutputPageBeforeHTML',array( &$wgOut, &$text ) );
                $wgOut->addHTML( $text );
-               if($this->mTitle->getNamespace() == NS_CATEGORY) {
+               if($this->mArticle->getTitle()->getNamespace() == NS_CATEGORY) {
                        $this->mArticle->closeShowCategory();
                }
                $wgOut->addHTML( '</div>' );
@@ -1335,7 +1345,7 @@ END
                $wgOut->addHTML( '<script type="'.$wgJsMimeType.'" src="' .
                        htmlspecialchars( "$wgStylePath/common/preview.js?$wgStyleVersion" ) .
                        '"></script>' . "\n" );
-               $liveAction = $wgTitle->getLocalUrl( 'action=submit&wpPreview=true&live=true' );
+               $liveAction = $this->mTitle->getLocalUrl( 'action=submit&wpPreview=true&live=true' );
                return "return !lpDoPreview(" .
                        "editform.wpTextbox1.value," .
                        '"' . $liveAction . '"' . ")";
@@ -1355,8 +1365,8 @@ END
                               'log_comment',
                               'log_params',
                               'user_name', ),
-                       array( 'log_namespace' => $this->mTitle->getNamespace(),
-                              'log_title' => $this->mTitle->getDBkey(),
+                       array( 'log_namespace' => $this->mArticle->getTitle()->getNamespace(),
+                              'log_title' => $this->mArticle->getTitle()->getDBkey(),
                               'log_type' => 'delete',
                               'log_action' => 'delete',
                               'user_id=log_user' ),
@@ -1412,13 +1422,13 @@ END
                # XXX: stupid php bug won't let us use $wgTitle->isCssJsSubpage() here
 
                if ( $this->isCssJsSubpage ) {
-                       if(preg_match("/\\.css$/", $wgTitle->getText() ) ) {
+                       if(preg_match("/\\.css$/", $this->mArticle->getTitle()->getText() ) ) {
                                $previewtext = wfMsg('usercsspreview');
-                       } else if(preg_match("/\\.js$/", $wgTitle->getText() ) ) {
+                       } else if(preg_match("/\\.js$/", $this->mArticle->getTitle()->getText() ) ) {
                                $previewtext = wfMsg('userjspreview');
                        }
                        $parserOptions->setTidy(true);
-                       $parserOutput = $wgParser->parse( $previewtext , $wgTitle, $parserOptions );
+                       $parserOutput = $wgParser->parse( $previewtext , $this->mArticle->getTitle(), $parserOptions );
                        $wgOut->addHTML( $parserOutput->mText );
                        wfProfileOut( $fname );
                        return $previewhead;
@@ -1434,7 +1444,7 @@ END
                        if ( $this->mMetaData != "" ) $toparse .= "\n" . $this->mMetaData ;
                        $parserOptions->setTidy(true);
                        $parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ) ."\n\n",
-                                       $wgTitle, $parserOptions );
+                                       $this->mArticle->getTitle(), $parserOptions );
 
                        $previewHTML = $parserOutput->getText();
                        $wgOut->addParserOutputNoText( $parserOutput );
@@ -1462,7 +1472,7 @@ END
                # (This happens when a user is blocked during edit, for instance)
                $first = $this->firsttime || ( !$this->save && $this->textbox1 == '' );
                if( $first ) {
-                       $source = $this->mTitle->exists() ? $this->getContent() : false;
+                       $source = $this->mArticle->getTitle()->exists() ? $this->getContent() : false;
                } else {
                        $source = $this->textbox1;
                }
@@ -1473,7 +1483,7 @@ END
                        $cols = $wgUser->getOption( 'cols' );
                        $attribs = array( 'id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $cols, 'rows' => $rows, 'readonly' => 'readonly' );
                        $wgOut->addHtml( '<hr />' );
-                       $wgOut->addWikiText( wfMsg( $first ? 'blockedoriginalsource' : 'blockededitsource', $this->mTitle->getPrefixedText() ) );
+                       $wgOut->addWikiText( wfMsg( $first ? 'blockedoriginalsource' : 'blockededitsource', $this->mArticle->getTitle()->getPrefixedText() ) );
                        $wgOut->addHtml( wfOpenElement( 'textarea', $attribs ) . htmlspecialchars( $source ) . wfCloseElement( 'textarea' ) );
                }
        }
@@ -1542,7 +1552,7 @@ END
 
                // This is the revision the editor started from
                $baseRevision = Revision::loadFromTimestamp(
-                       $db, $this->mArticle->mTitle, $this->edittime );
+                       $db, $this->mArticle->getTitle(), $this->edittime );
                if( is_null( $baseRevision ) ) {
                        wfProfileOut( $fname );
                        return false;
@@ -1551,7 +1561,7 @@ END
 
                // The current state, we want to merge updates into it
                $currentRevision =  Revision::loadFromTitle(
-                       $db, $this->mArticle->mTitle );
+                       $db, $this->mArticle->getTitle() );
                if( is_null( $currentRevision ) ) {
                        wfProfileOut( $fname );
                        return false;
@@ -1913,7 +1923,7 @@ END
                $oldtitle = wfMsgExt( 'currentrev', array('parseinline') );
                $newtitle = wfMsgExt( 'yourtext', array('parseinline') );
                if ( $oldtext !== false  || $newtext != '' ) {
-                       $de = new DifferenceEngine( $this->mTitle );
+                       $de = new DifferenceEngine( $this->mArticle->getTitle() );
                        $de->setText( $oldtext, $newtext );
                        $difftext = $de->getDiff( $oldtitle, $newtitle );
                        $de->showDiffStyle();
index e61578d..41a75ba 100644 (file)
@@ -234,6 +234,13 @@ class Linker {
                                wfProfileOut( __METHOD__ );
                                return $retVal;
                        }
+                       
+                       $hookRetVal = "";
+                       if( ! wfRunHooks('LinkerMakeLinkObj', array(&$hookRetVal, &$this, $nt, $text, $query, $trail, $prefix)) ) {
+                               wfProfileOut( __METHOD__.'-immediate' );
+                               wfProfileOut( __METHOD__ );
+                               return $hookRetVal;
+                       }
 
                        # Work out link colour immediately
                        $aid = $nt->getArticleID() ;
index a0fd4ef..deb126b 100644 (file)
@@ -63,6 +63,9 @@ class OutputPage {
                $this->mRedirect = str_replace( "\n", '', $url );
                $this->mRedirectCode = $responsecode;
        }
+       public function getRedirect() {
+               return $this->mRedirect;
+       }
 
        /**
         * Set the HTTP status code to send with the output.
index 3815dcb..8b4c02f 100644 (file)
@@ -277,7 +277,7 @@ class Parser
         * @param int $revid number to pass in {{REVISIONID}}
         * @return ParserOutput a ParserOutput
         */
-       public function parse( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) {
+       public function parse( $text, $title, $options, $linestart = true, $clearState = true, $revid = null ) {
                /**
                 * First pass--just handle <nowiki> sections, pass the rest off
                 * to internalParse() which does all the real work.
index ded0124..2d98cf8 100644 (file)
@@ -72,6 +72,11 @@ class SpecialPage
         * Query parameters that can be passed through redirects
         */
        var $mAllowedRedirectParams = array();
+       
+       /**
+        * Should the subpage part be removed from titles in executePath()?
+        **/
+       static public $mStripSubpages = true;
 
        static public $mList = array(
                'DoubleRedirects'           => array( 'SpecialPage', 'DoubleRedirects' ),
@@ -449,7 +454,7 @@ class SpecialPage
                        wfProfileOut( __METHOD__ );
                        return false;
                } elseif ( !$including ) {
-                       $wgTitle = $page->getTitle();
+                       $wgTitle = $page->getTitle( SpecialPage::$mStripSubpages ? '' : $par );
                }
                $page->including( $including );
 
index e9aa7e6..546a8a4 100644 (file)
@@ -122,6 +122,11 @@ function wfSpecialWatchlist( $par ) {
        wfAppendToArrayIfNotDefault( 'hideMinor', (int)$hideMinor, $defaults, $nondefaults );
        wfAppendToArrayIfNotDefault('namespace', $nameSpace    , $defaults, $nondefaults);
 
+       $hookSql = "";
+       if( ! wfRunHooks('BeforeWatchlist', array($nondefaults, $wgUser, &$hookSql)) ) {
+               return;
+       }
+
        if ( $days <= 0 ) {
                $andcutoff = '';
        } else {
@@ -193,6 +198,7 @@ function wfSpecialWatchlist( $par ) {
          $andHideBots
          $andHideMinor
          $nameSpaceClause
+         $hookSql
          ORDER BY rc_timestamp DESC
          $limitWatchlist";
 
index 5a62261..fe9f25c 100644 (file)
@@ -1622,7 +1622,11 @@ class Title {
         * @param string $action action that permission needs to be checked for
         * @return array the array of groups allowed to edit this article
         */
-       public function getRestrictions( $action ) {
+       public function getRestrictions( $action ) {            
+               $result = array();
+               if( !wfRunHooks('TitleGetRestrictions', array($this, $action, &$result)) )
+                       return $result;
+
                if( $this->exists() ) {
                        if( !$this->mRestrictionsLoaded ) {
                                $this->loadRestrictions();
index 72a6a61..1b2e557 100644 (file)
@@ -371,6 +371,11 @@ class MediaWiki {
 
                wfProfileIn( 'MediaWiki::performAction' );
 
+               if ( !wfRunHooks('MediaWikiPerformAction', array($output, $article, $title, $user, $request)) ) {
+                       wfProfileOut( 'MediaWiki::performAction' );
+                       return;
+               }
+
                $action = $this->getVal('Action');
                if( in_array( $action, $this->getVal('DisabledActions',array()) ) ) {
                        /* No such action; this will switch to the default case */