Daniel Kinzler has uploaded a new change for review.
https://gerrit.wikimedia.org/r/303363
Change subject: The parameter to the SearchableNamespaces hook handler needs to
be a references.
......................................................................
The parameter to the SearchableNamespaces hook handler needs to be a references.
If the parameter is not a reference, the hook has no effect.
Change-Id: I0d0633daea6ae47720878937694fc51dd80f5252
---
M Lockdown.php
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lockdown
refs/changes/63/303363/1
diff --git a/Lockdown.php b/Lockdown.php
index 3502028..5080cce 100644
--- a/Lockdown.php
+++ b/Lockdown.php
@@ -160,7 +160,7 @@
}
}
-function lockdownSearchableNamespaces($arr) {
+function lockdownSearchableNamespaces( &$searchableNs ) {
global $wgNamespacePermissionLockdown;
$user = RequestContext::getMain()->getUser();
@@ -176,7 +176,7 @@
$ugroups = $user->getEffectiveGroups( true );;
- foreach ( $arr as $ns => $name ) {
+ foreach ( $searchableNs as $ns => $name ) {
$groups = @$wgNamespacePermissionLockdown[$ns]['read'];
if ( $groups === null ) {
$groups = @$wgNamespacePermissionLockdown['*']['read'];
@@ -190,7 +190,7 @@
}
if ( !$groups || !array_intersect( $ugroups, $groups ) ) {
- unset( $arr[$ns] );
+ unset( $searchableNs[$ns] );
}
}
return true;
--
To view, visit https://gerrit.wikimedia.org/r/303363
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d0633daea6ae47720878937694fc51dd80f5252
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lockdown
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits