r34669 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34668‎ | r34669 | r34670 >
Date:16:40, 12 May 2008
Author:aaron
Status:old
Tags:
Comment:
Move article init to MediaWikiPerformAction hook
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -239,7 +239,7 @@
240240
241241 ######### Hook attachments #########
242242 # Set $wgFlaggedArticle
243 - $wgHooks['ArticleFromTitle'][] = 'wfInitFlaggedArticle';
 243+ $wgHooks['MediaWikiPerformAction'][] = 'wfInitFlaggedArticle';
244244 # Autopromote Editors
245245 $wgHooks['ArticleSaveComplete'][] = 'FlaggedRevs::autoPromoteUser';
246246 # Adds table link references to include ones from the stable version
@@ -280,9 +280,9 @@
281281 #########
282282 }
283283
284 -function wfInitFlaggedArticle( $title, $article ) {
 284+function wfInitFlaggedArticle( $output, $article, $title, $user, $request ) {
285285 global $wgFlaggedArticle, $wgHooks;
286 - if( $title->isRedirect() || !FlaggedRevs::isPageReviewable($title) )
 286+ if( !FlaggedRevs::isPageReviewable($title) )
287287 return true;
288288 # Initialize and set article hooks
289289 $wgFlaggedArticle = new FlaggedArticle( $title );

Status & tagging log