Fix logic in NamespaceInfo::getRestrictionLevels
authorAryeh Gregor <ayg@aryeh.name>
Mon, 6 May 2019 07:27:02 +0000 (10:27 +0300)
committerBill Pirkle <bpirkle@wikimedia.org>
Thu, 9 May 2019 18:46:44 +0000 (13:46 -0500)
commiteb2dbfdef6c14dbb8756531df3618d394f3adc47
tree60da8f205b89e371969705135f6684885b6303ce
parent76b32deefd8dc09f170e7f2645c5d3ca5c0a0652
Fix logic in NamespaceInfo::getRestrictionLevels

When $wgNamespaceProtection specifies multiple rights for a
namespace, the code was assuming all of those rights had to
come from one group. But MediaWiki allows for the rights to
come from multiple groups that each give a subset of the rights. Allow for that case.

Bug: T222598
Change-Id: I1e9aca6e521260f783bd881e7d095d62bc605dc6
includes/title/NamespaceInfo.php
tests/phpunit/includes/title/NamespaceInfoTest.php