r35273 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35272‎ | r35273 | r35274 >
Date:05:43, 24 May 2008
Author:aaron
Status:old
Tags:
Comment:
Return out if $result set to false by some other hooked call
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1513,7 +1513,8 @@
15141514 public static function userCanView( $title, $user, $action, $result ) {
15151515 global $wgFlaggedRevsVisible, $wgFlaggedRevsTalkVisible, $wgTitle;
15161516 # Assume $action may still not be set, in which case, treat it as 'view'...
1517 - if( !$wgFlaggedRevsVisible || $action != 'read' )
 1517+ # Return out if $result set to false by some other hooked call.
 1518+ if( !$wgFlaggedRevsVisible || $action != 'read' || $result===false )
15181519 return true;
15191520 # Admin may set this to false, rather than array()...
15201521 $groups = $user->getGroups();

Status & tagging log