r28561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28560‎ | r28561 | r28562 >
Date:19:57, 16 December 2007
Author:simetrical
Status:old
Tags:
Comment:
Moving pages seems to have been completely broken for unprotected titles; fixed that. Note that it doesn't seem as though it necessarily works properly for protected titles either (cursory test prohibited me as a sysop from moving over sysop protection), but I haven't looked too closely at that, I'm doing something else now.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -1253,7 +1253,8 @@
12541254
12551255 /**
12561256 * Is this title subject to title protection?
1257 - * @return array An associative array representing any existent title protection.
 1257+ * @return mixed An associative array representing any existent title
 1258+ * protection, or false if there's none.
12581259 */
12591260 public function getTitleProtection() {
12601261 $dbr = wfGetDB( DB_SLAVE );
@@ -2305,7 +2306,7 @@
23062307 }
23072308 } else {
23082309 $tp = $nt->getTitleProtection();
2309 - if (!$wgUser->isAllowed($tp['pt_create_perm'])) {
 2310+ if ( $tp and !$wgUser->isAllowed( $tp['pt_create_perm'] ) ) {
23102311 return 'cantmove-titleprotected';
23112312 }
23122313 }
@@ -2906,4 +2907,4 @@
29072908 return Namespace::isContent( $this->getNamespace() );
29082909 }
29092910
2910 -}
\ No newline at end of file
 2911+}

Status & tagging log