r35257 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35256‎ | r35257 | r35258 >
Date:21:31, 23 May 2008
Author:simetrical
Status:old
Tags:
Comment:
Fix another bug pointed out by Brion, pseudo-subpages can get moved.
Modified paths:
  • /trunk/phase3/includes/SpecialMovepage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialMovepage.php
@@ -326,11 +326,12 @@
327327 'page_title LIKE '.$dbr->addQuotes( $dbr->escapeLike( $ot->getDBkey() ) . '/%' )
328328 .' OR page_title = ' . $dbr->addQuotes( $ot->getDBkey() )
329329 );
 330+ $conds['page_namespace'] = array();
 331+ if( !empty( $wgNamespacesWithSubpages[$nt->getNamespace()] ) ) {
 332+ $conds['page_namespace'] []= $ot->getNamespace();
 333+ }
330334 if( $this->moveTalk && !empty( $wgNamespacesWithSubpages[$nt->getTalkPage()->getNamespace()] ) ) {
331 - $conds['page_namespace'] = array( $ot->getNamespace(),
332 - MWNamespace::getTalk($ot->getNamespace()) );
333 - } else {
334 - $conds['page_namespace'] = $ot->getNamespace();
 335+ $conds['page_namespace'] []= $ot->getTalkPage()->getNamespace();
335336 }
336337 } elseif( $this->moveTalk ) {
337338 $conds = array(

Status & tagging log