Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -753,6 +753,7 @@ |
754 | 754 | $request: WebRequest |
755 | 755 | $ignoreRedirect: boolean to skip redirect check |
756 | 756 | $target: Title/string of redirect target |
| 757 | +$article: Article object |
757 | 758 | |
758 | 759 | 'InitPreferencesForm': called at the end of PreferencesForm's constructor |
759 | 760 | $form: the PreferencesForm |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -51,7 +51,7 @@ |
52 | 52 | */ |
53 | 53 | function initialize( &$title, &$article, &$output, &$user, $request ) { |
54 | 54 | wfProfileIn( __METHOD__ ); |
55 | | - $this->preliminaryChecks( $title, $output, $request ) ; |
| 55 | + $this->preliminaryChecks( $title, $output, $request ); |
56 | 56 | if( !$this->initializeSpecialCases( $title, $output, $request ) ) { |
57 | 57 | $new_article = $this->initializeArticle( $title, $request ); |
58 | 58 | if( is_object( $new_article ) ) { |
— | — | @@ -131,7 +131,6 @@ |
132 | 132 | * @param $request WebRequest |
133 | 133 | */ |
134 | 134 | function preliminaryChecks( &$title, &$output, $request ) { |
135 | | - |
136 | 135 | if( $request->getCheck( 'search' ) ) { |
137 | 136 | // Compatibility with old search URLs which didn't use Special:Search |
138 | 137 | // Just check for presence here, so blank requests still |
— | — | @@ -140,7 +139,6 @@ |
141 | 140 | // Do this above the read whitelist check for security... |
142 | 141 | $title = SpecialPage::getTitleFor( 'Search' ); |
143 | 142 | } |
144 | | - |
145 | 143 | # If the user is not logged in, the Namespace:title of the article must be in |
146 | 144 | # the Read array in order for the user to see it. (We have to check here to |
147 | 145 | # catch special pages etc. We check again in Article::view()) |
— | — | @@ -149,7 +147,6 @@ |
150 | 148 | $output->output(); |
151 | 149 | exit; |
152 | 150 | } |
153 | | - |
154 | 151 | } |
155 | 152 | |
156 | 153 | /** |
— | — | @@ -309,7 +306,8 @@ |
310 | 307 | $dbr = wfGetDB( DB_SLAVE ); |
311 | 308 | $article->loadPageData( $article->pageDataFromTitle( $dbr, $title ) ); |
312 | 309 | |
313 | | - wfRunHooks( 'InitializeArticleMaybeRedirect', array( &$title, &$request, &$ignoreRedirect, &$target ) ); |
| 310 | + wfRunHooks( 'InitializeArticleMaybeRedirect', |
| 311 | + array(&$title,&$request,&$ignoreRedirect,&$target,&$article) ); |
314 | 312 | |
315 | 313 | // Follow redirects only for... redirects |
316 | 314 | if( !$ignoreRedirect && $article->isRedirect() ) { |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1140,7 +1140,7 @@ |
1141 | 1141 | return true; |
1142 | 1142 | } |
1143 | 1143 | |
1144 | | - public static function overrideRedirect( &$title, $request, &$ignoreRedirect, &$target ) { |
| 1144 | + public static function overrideRedirect( &$title, $request, &$ignoreRedirect, &$target, &$article ) { |
1145 | 1145 | # Get an instance on the title ($wgTitle) |
1146 | 1146 | if( !FlaggedRevs::isPageReviewable($title) ) { |
1147 | 1147 | return true; |
— | — | @@ -1152,7 +1152,7 @@ |
1153 | 1153 | # Try the cache... |
1154 | 1154 | $key = wfMemcKey( 'flaggedrevs', 'overrideRedirect', $title->getArticleId() ); |
1155 | 1155 | $data = $wgMemc->get($key); |
1156 | | - if( is_object($data) && $data->time > $title->getTouched() ) { |
| 1156 | + if( is_object($data) && $data->time > $article->getTouched() ) { |
1157 | 1157 | list($ignoreRedirect,$target) = $data->value; |
1158 | 1158 | return true; |
1159 | 1159 | } |