Thread:Extension talk:Lockdown/Lockdown not showing user groups/reply (3)

The complete patch to apply to the version of Lockdown from 1_17_0 svn-tree:

--- svn-extensions/Lockdown/Lockdown.php       2011-06-27 19:53:38.000000000 +0000 +++ man-extensions/Lockdown-patched/Lockdown.php       2011-06-27 20:26:20.000000000 +0000 @@ -96,7 +96,7 @@       # print " nsAccessUserCan(".$title->getPrefixedDBkey.", ".$user->getName.", $action) \n"; # print_r($groups); -      $ugroups = $user->getEffectiveGroups; +      $ugroups = $user->getEffectiveGroups(true); # print_r($ugroups); $match = array_intersect( $ugroups, $groups ); @@ -127,7 +127,7 @@       if ( $groups === null ) return true; if ( count( $groups ) == 0 ) return false; -      $ugroups = $user->getEffectiveGroups; +      $ugroups = $user->getEffectiveGroups(true); $match = array_intersect( $ugroups, $groups ); if ( $match ) return true; @@ -136,7 +136,7 @@ function lockdownSearchableNamespaces($arr) { global $wgUser, $wgNamespacePermissionLockdown; -      $ugroups = $wgUser->getEffectiveGroups; +      $ugroups = $wgUser->getEffectiveGroups(true); foreach ( $arr as $ns => $name ) { $groups = @$wgNamespacePermissionLockdown[$ns]['read']; @@ -155,7 +155,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 ) $groups = @$wgNamespacePermissionLockdown['*']['read']; @@ -184,7 +184,7 @@               return true; } -      $ugroups = $wgUser->getEffectiveGroups; +      $ugroups = $wgUser->getEffectiveGroups(true); foreach ( $searchEngine->namespaces as $key => $ns ) { $groups = @$wgNamespacePermissionLockdown[$ns]['read'];