http://www.mediawiki.org/wiki/Special:Code/MediaWiki/94275

Revision: 94275
Author:   mah
Date:     2011-08-11 19:39:06 +0000 (Thu, 11 Aug 2011)
Log Message:
-----------
fix bug #30275 ?\226?\128?\156SearchableNamespaces hook removes robots 
permissions?\226?\128?\157

avoid cache when using getEffectiveGroups

Modified Paths:
--------------
    trunk/extensions/Lockdown/Lockdown.php

Modified: trunk/extensions/Lockdown/Lockdown.php
===================================================================
--- trunk/extensions/Lockdown/Lockdown.php      2011-08-11 19:32:04 UTC (rev 
94274)
+++ trunk/extensions/Lockdown/Lockdown.php      2011-08-11 19:39:06 UTC (rev 
94275)
@@ -105,7 +105,7 @@
        # print "<br />nsAccessUserCan(".$title->getPrefixedDBkey().", 
".$user->getName().", $action)<br />\n";
        # print_r($groups);
 
-       $ugroups = $user->getEffectiveGroups();
+       $ugroups = $user->getEffectiveGroups( true );;
        # print_r($ugroups);
 
        $match = array_intersect( $ugroups, $groups );
@@ -141,7 +141,7 @@
                return false;
        }
 
-       $ugroups = $user->getEffectiveGroups();
+       $ugroups = $user->getEffectiveGroups( true );;
        $match = array_intersect( $ugroups, $groups );
 
        if ( $match ) {
@@ -159,7 +159,7 @@
                return true;
        }
 
-       $ugroups = $wgUser->getEffectiveGroups();
+       $ugroups = $wgUser->getEffectiveGroups( true );;
 
        foreach ( $arr as $ns => $name ) {
                $groups = @$wgNamespacePermissionLockdown[$ns]['read'];
@@ -184,7 +184,7 @@
 function lockdownTitle(&$title) {
        if ( is_object($title) ) {
                global $wgUser, $wgNamespacePermissionLockdown;
-               $ugroups = $wgUser->getEffectiveGroups();
+               $ugroups = $wgUser->getEffectiveGroups( true );;
 
                $groups = 
@$wgNamespacePermissionLockdown[$title->getNamespace()]['read'];
                if ( $groups === null ) {
@@ -219,7 +219,7 @@
                return true;
        }
 
-       $ugroups = $wgUser->getEffectiveGroups();
+       $ugroups = $wgUser->getEffectiveGroups( true );;
 
        foreach ( $searchEngine->namespaces as $key => $ns ) {
                $groups = @$wgNamespacePermissionLockdown[$ns]['read'];


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to