Fix Title::loadRestrictions() for create-protected titles
authorBrad Jorsch <bjorsch@wikimedia.org>
Sat, 4 Feb 2017 15:22:01 +0000 (10:22 -0500)
committerAnomie <bjorsch@wikimedia.org>
Thu, 2 Mar 2017 17:09:30 +0000 (17:09 +0000)
commite89b499351c5d581522bbdc933f8a1cad91c0b31
tree1ae6e9c2746429204491a59e74045af29e4acbaa
parent5a7cfcda8bafbee495cd9f481c92b5c131c015f8
Fix Title::loadRestrictions() for create-protected titles

Title::loadRestrictions() returns restriction levels, not the
corresponding user rights. These are mostly identical except for the
backwards-compatibility levels "sysop" and "autoconfirmed".

For create protection it calls Title::getTitleProtection() to fetch
them, but Ic5026384 changed that to return rights. Split that function
into two, an internal method that returns restriction levels for
loadRestrictions() to call and the public method that converts levels
into rights.

Bug: T85108
Change-Id: I3ea4cb9c5e37b746402744dd7a883763ee07195a
includes/Title.php