* Disallow moving to a title that has been protected with the protected titles functi...
authorAndrew Garrett <werdna@users.mediawiki.org>
Sat, 15 Dec 2007 23:51:54 +0000 (23:51 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Sat, 15 Dec 2007 23:51:54 +0000 (23:51 +0000)
includes/Title.php
languages/messages/MessagesEn.php

index ea608c0..f632392 100644 (file)
@@ -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;
        }
index cde72f1..4bb4e91 100644 (file)
@@ -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',