Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -551,7 +551,7 @@ |
552 | 552 | * @param User $user (optional) |
553 | 553 | * @returns ParserOptions |
554 | 554 | */ |
555 | | - public static function makeParserOptions( User $user = null ) { |
| 555 | + public static function makeParserOptions( $user = null ) { |
556 | 556 | global $wgUser; |
557 | 557 | $user = $user ? $user : $wgUser; // assume current |
558 | 558 | $options = ParserOptions::newFromUser( $user ); |
— | — | @@ -568,7 +568,7 @@ |
569 | 569 | * @return ParserOutput |
570 | 570 | * Get the page cache for the top stable revision of an article |
571 | 571 | */ |
572 | | - public static function getPageCache( Article $article, User $user ) { |
| 572 | + public static function getPageCache( Article $article, $user ) { |
573 | 573 | global $parserMemc, $wgCacheEpoch; |
574 | 574 | wfProfileIn( __METHOD__ ); |
575 | 575 | # Make sure it is valid |
— | — | @@ -616,7 +616,7 @@ |
617 | 617 | /** |
618 | 618 | * Like ParserCache::getKey() with stable-pcache instead of pcache |
619 | 619 | */ |
620 | | - public static function getCacheKey( $parserCache, Article $article, User $user ) { |
| 620 | + public static function getCacheKey( $parserCache, Article $article, $user ) { |
621 | 621 | $key = $parserCache->getKey( $article, $user ); |
622 | 622 | $key = str_replace( ':pcache:', ':stable-pcache:', $key ); |
623 | 623 | return $key; |
— | — | @@ -629,7 +629,7 @@ |
630 | 630 | * Updates the stable cache of a page with the given $parserOut |
631 | 631 | */ |
632 | 632 | public static function updatePageCache( |
633 | | - Article $article, User $user, ParserOutput $parserOut = null |
| 633 | + Article $article, $user, ParserOutput $parserOut = null |
634 | 634 | ) { |
635 | 635 | global $parserMemc, $wgParserCacheExpireTime, $wgEnableParserCache; |
636 | 636 | # Make sure it is valid and $wgEnableParserCache is enabled |
— | — | @@ -1479,7 +1479,7 @@ |
1480 | 1480 | * If no appropriate tags can be found, then the review will abort. |
1481 | 1481 | */ |
1482 | 1482 | public static function autoReviewEdit( |
1483 | | - Article $article, User $user, $text, Revision $rev, array $flags = null, $auto = true |
| 1483 | + Article $article, $user, $text, Revision $rev, array $flags = null, $auto = true |
1484 | 1484 | ) { |
1485 | 1485 | wfProfileIn( __METHOD__ ); |
1486 | 1486 | $title = $article->getTitle(); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -260,7 +260,7 @@ |
261 | 261 | * Autoreview pages moved into content NS |
262 | 262 | */ |
263 | 263 | public static function onTitleMoveComplete( |
264 | | - Title $otitle, Title $ntitle, User $user, $pageId |
| 264 | + Title $otitle, Title $ntitle, $user, $pageId |
265 | 265 | ) { |
266 | 266 | $fa = FlaggedArticle::getTitleInstance( $ntitle ); |
267 | 267 | // Re-validate NS/config (new title may not be reviewable) |
— | — | @@ -798,7 +798,7 @@ |
799 | 799 | /** |
800 | 800 | * Check page move and patrol permissions for FlaggedRevs |
801 | 801 | */ |
802 | | - public static function onUserCan( Title $title, User $user, $action, &$result ) { |
| 802 | + public static function onUserCan( Title $title, $user, $action, &$result ) { |
803 | 803 | if ( $result === false ) { |
804 | 804 | return true; // nothing to do |
805 | 805 | } |
— | — | @@ -849,7 +849,7 @@ |
850 | 850 | /** |
851 | 851 | * Allow users to view reviewed pages |
852 | 852 | */ |
853 | | - public static function userCanView( Title $title, User $user, $action, &$result ) { |
| 853 | + public static function userCanView( Title $title, $user, $action, &$result ) { |
854 | 854 | global $wgFlaggedRevsVisible, $wgFlaggedRevsTalkVisible, $wgTitle; |
855 | 855 | # Assume $action may still not be set, in which case, treat it as 'view'... |
856 | 856 | # Return out if $result set to false by some other hooked call. |
— | — | @@ -980,7 +980,7 @@ |
981 | 981 | // Review $rev if $editTimestamp matches the previous revision's timestamp. |
982 | 982 | // Otherwise, review the revision that has $editTimestamp as its timestamp value. |
983 | 983 | protected static function editCheckReview( |
984 | | - Article $article, $rev, User $user, $editTimestamp |
| 984 | + Article $article, $rev, $user, $editTimestamp |
985 | 985 | ) { |
986 | 986 | $prevRevId = $rev->getParentId(); |
987 | 987 | $prevTimestamp = $flags = null; |
— | — | @@ -1011,7 +1011,7 @@ |
1012 | 1012 | * Check if a user reverted himself to the stable version |
1013 | 1013 | */ |
1014 | 1014 | protected static function isSelfRevertToStable( |
1015 | | - Revision $rev, $srev, $baseRevId, User $user |
| 1015 | + Revision $rev, $srev, $baseRevId, $user |
1016 | 1016 | ) { |
1017 | 1017 | if ( !$srev || $baseRevId != $srev->getRevId() ) { |
1018 | 1018 | return false; // user reports they are not the same |
— | — | @@ -1164,7 +1164,7 @@ |
1165 | 1165 | } |
1166 | 1166 | |
1167 | 1167 | public static function incrementRollbacks( |
1168 | | - $article, User $user, $target, Revision $current |
| 1168 | + $article, $user, $target, Revision $current |
1169 | 1169 | ) { |
1170 | 1170 | # Mark when a user reverts another user, but not self-reverts |
1171 | 1171 | if ( $current->getRawUser() && $user->getId() != $current->getRawUser() ) { |
— | — | @@ -1200,7 +1200,7 @@ |
1201 | 1201 | return true; |
1202 | 1202 | } |
1203 | 1203 | |
1204 | | - protected static function editSpacingCheck( $spacing, $points, User $user ) { |
| 1204 | + protected static function editSpacingCheck( $spacing, $points, $user ) { |
1205 | 1205 | # Convert days to seconds... |
1206 | 1206 | $spacing = $spacing * 24 * 3600; |
1207 | 1207 | # Check the oldest edit |
— | — | @@ -1230,7 +1230,7 @@ |
1231 | 1231 | /** |
1232 | 1232 | * Checks if $user was previously blocked |
1233 | 1233 | */ |
1234 | | - public static function previousBlockCheck( User $user ) { |
| 1234 | + public static function previousBlockCheck( $user ) { |
1235 | 1235 | $dbr = wfGetDB( DB_SLAVE ); |
1236 | 1236 | return (bool)$dbr->selectField( 'logging', '1', |
1237 | 1237 | array( |
— | — | @@ -1246,7 +1246,7 @@ |
1247 | 1247 | /** |
1248 | 1248 | * Grant 'autoreview' rights to users with the 'bot' right |
1249 | 1249 | */ |
1250 | | - public static function onUserGetRights( User $user, array &$rights ) { |
| 1250 | + public static function onUserGetRights( $user, array &$rights ) { |
1251 | 1251 | # Make sure bots always have the 'autoreview' right |
1252 | 1252 | if ( in_array( 'bot', $rights ) && !in_array( 'autoreview', $rights ) ) { |
1253 | 1253 | $rights[] = 'autoreview'; |
— | — | @@ -1261,7 +1261,7 @@ |
1262 | 1262 | * |
1263 | 1263 | * Note: some unobtrusive caching is used to avoid DB hits. |
1264 | 1264 | */ |
1265 | | - public static function checkAutoPromote( User $user, array &$promote ) { |
| 1265 | + public static function checkAutoPromote( $user, array &$promote ) { |
1266 | 1266 | global $wgFlaggedRevsAutoconfirm, $wgMemc; |
1267 | 1267 | # Check if $wgFlaggedRevsAutoconfirm is actually enabled |
1268 | 1268 | # and that this is a logged-in user that doesn't already |
— | — | @@ -1374,7 +1374,7 @@ |
1375 | 1375 | * $wgFlaggedRevsAutopromote. This also handles user stats tallies. |
1376 | 1376 | */ |
1377 | 1377 | public static function maybeMakeEditor( |
1378 | | - Article $article, User $user, $text, $summary, $m, $a, $b, &$f, $rev |
| 1378 | + Article $article, $user, $text, $summary, $m, $a, $b, &$f, $rev |
1379 | 1379 | ) { |
1380 | 1380 | global $wgFlaggedRevsAutopromote, $wgFlaggedRevsAutoconfirm, $wgMemc; |
1381 | 1381 | # Ignore NULL edits or edits by anon users |
— | — | @@ -1610,7 +1610,7 @@ |
1611 | 1611 | } |
1612 | 1612 | |
1613 | 1613 | /** Add user preferences */ |
1614 | | - public static function onGetPreferences( User $user, array &$preferences ) { |
| 1614 | + public static function onGetPreferences( $user, array &$preferences ) { |
1615 | 1615 | // Box or bar UI |
1616 | 1616 | $preferences['flaggedrevssimpleui'] = |
1617 | 1617 | array( |