r44997 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44996‎ | r44997 | r44998 >
Date:13:30, 24 December 2008
Author:ialex
Status:ok
Tags:
Comment:
For compatibility with PHP 5.3, removing reference to $action since it's passed "by value", resulting in E_WARNING.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -576,7 +576,7 @@
577577 /**
578578 * Don't let users vandalize pages by moving them
579579 */
580 - public static function userCanMove( $title, $user, &$action, &$result ) {
 580+ public static function userCanMove( $title, $user, $action, &$result ) {
581581 if( $action != 'move' || $result===false || !FlaggedRevs::isPageReviewable($title) ) {
582582 return true;
583583 }
@@ -597,7 +597,7 @@
598598 /**
599599 * Don't let users pages pages not in $wgFlaggedRevsPatrolNamespaces
600600 */
601 - public static function userCanPatrol( $title, $user, &$action, &$result ) {
 601+ public static function userCanPatrol( $title, $user, $action, &$result ) {
602602 if( $action != 'patrol' || $result===false ) {
603603 return true;
604604 }
@@ -629,7 +629,7 @@
630630 /**
631631 * Allow users to view reviewed pages
632632 */
633 - public static function userCanView( $title, $user, &$action, &$result ) {
 633+ public static function userCanView( $title, $user, $action, &$result ) {
634634 global $wgFlaggedRevsVisible, $wgFlaggedRevsTalkVisible, $wgTitle;
635635 # Assume $action may still not be set, in which case, treat it as 'view'...
636636 # Return out if $result set to false by some other hooked call.

Follow-up revisions

RevisionCommit summaryAuthorDate
r45000Same as r44997, fix compatibility with PHP 5.3ialex14:53, 24 December 2008

Status & tagging log