From b3aaa8e4a6308c3c2939b2aae6393cb738ee3691 Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Mon, 12 May 2008 14:12:51 +0000 Subject: [PATCH] (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation --- RELEASE-NOTES | 1 + includes/Title.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 1093931cda..1934dcf0dd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -269,6 +269,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14058) Support pipe trick for namespaces and interwikis with "-" * Message name filter on Special:Allmessages now case-insensitive * (bug 13943) Fix image redirect behaviour on image pages +* (bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation === API changes in 1.13 === diff --git a/includes/Title.php b/includes/Title.php index 1637a3e596..c7bf1dab3f 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2440,7 +2440,8 @@ class Title { } } else { $tp = $nt->getTitleProtection(); - if ( $tp and !$wgUser->isAllowed( $tp['pt_create_perm'] ) ) { + $right = ( $tp['pt_create_perm'] == 'sysop' ) ? 'protect' : $tp['pt_create_perm']; + if ( $tp and !$wgUser->isAllowed( $right ) ) { return 'cantmove-titleprotected'; } } -- 2.20.1