(bug 14093) Do 'sysop' => 'protect' magic in Title::isValidMoveOperation
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Mon, 12 May 2008 14:12:51 +0000 (14:12 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Mon, 12 May 2008 14:12:51 +0000 (14:12 +0000)
RELEASE-NOTES
includes/Title.php

index 1093931..1934dcf 100644 (file)
@@ -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 ===
 
index 1637a3e..c7bf1da 100644 (file)
@@ -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';
                        }
                }