MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398519 )

Change subject: Fix two bugs with lockdownNamespace()
......................................................................

Fix two bugs with lockdownNamespace()

* Changing search's behavior for “go to page” by actually setting
  $title to null.
* Allow the general public to see namespaces without any group restrictions.

Change-Id: Icaf433663311f36f0893a7ec4b660c954fa1b5e6
---
M Lockdown.php
1 file changed, 4 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Lockdown 
refs/changes/19/398519/1

diff --git a/Lockdown.php b/Lockdown.php
index 9deef15..9ba1af0 100644
--- a/Lockdown.php
+++ b/Lockdown.php
@@ -200,12 +200,7 @@
                $groups = @$wgNamespacePermissionLockdown[$ns]['*'];
        }
 
-       if ( $groups === null ) {
-               return false;
-       }
-
-       if ( !$groups || !array_intersect($ugroups, $groups) ) {
-               $title = null;
+       if ( $groups && !array_intersect($ugroups, $groups) ) {
                return false;
        }
 
@@ -218,6 +213,8 @@
 
        if ( $title ) {
                $ugroups = $wgUser->getEffectiveGroups();
-               return lockdownNamespace( $title->getNamespace(), $ugroups );
+               if ( !lockdownNamespace( $title->getNamespace(), $ugroups ) ) {
+                       $title = null;
+               }
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/398519
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icaf433663311f36f0893a7ec4b660c954fa1b5e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lockdown
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger <[email protected]>

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

Reply via email to