From: Andrew Garrett Date: Sat, 15 Dec 2007 23:51:54 +0000 (+0000) Subject: * Disallow moving to a title that has been protected with the protected titles functi... X-Git-Tag: 1.31.0-rc.0~50408 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=27f30cf21dcba3cef47c0350fb928993e7061f98;p=lhc%2Fweb%2Fwiklou.git * Disallow moving to a title that has been protected with the protected titles functionality. --- diff --git a/includes/Title.php b/includes/Title.php index ea608c04df..f632392814 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2303,6 +2303,11 @@ class Title { if ( ! $this->isValidMoveTarget( $nt ) ) { return 'articleexists'; } + } else { + $tp = $nt->getTitleProtection(); + if (!$wgUser->isAllowed($tp['pt_create_perm'])) { + return 'cantmove-titleprotected'; + } } return true; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index cde72f19c9..4bb4e91879 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2213,6 +2213,7 @@ In those cases, you will have to move or merge the page manually if desired.", 'articleexists' => 'A page of that name already exists, or the name you have chosen is not valid. Please choose another name.', +'cantmove-titleprotected' => 'You cannot move a page to this location, because the new title has been protected from creation', 'talkexists' => "'''The page itself was moved successfully, but the talk page could not be moved because one already exists at the new title. Please merge them manually.'''", 'movedto' => 'moved to', 'movetalk' => 'Move associated talk page',