r28529 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28528‎ | r28529 | r28530 >
Date:23:51, 15 December 2007
Author:werdna
Status:old
Tags:
Comment:
* Disallow moving to a title that has been protected with the protected titles functionality.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2303,6 +2303,11 @@
23042304 if ( ! $this->isValidMoveTarget( $nt ) ) {
23052305 return 'articleexists';
23062306 }
 2307+ } else {
 2308+ $tp = $nt->getTitleProtection();
 2309+ if (!$wgUser->isAllowed($tp['pt_create_perm'])) {
 2310+ return 'cantmove-titleprotected';
 2311+ }
23072312 }
23082313 return true;
23092314 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2213,6 +2213,7 @@
22142214 'articleexists' => 'A page of that name already exists, or the
22152215 name you have chosen is not valid.
22162216 Please choose another name.',
 2217+'cantmove-titleprotected' => 'You cannot move a page to this location, because the new title has been protected from creation',
22172218 '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.'''",
22182219 'movedto' => 'moved to',
22192220 'movetalk' => 'Move associated talk page',

Status & tagging log