Allow moving category pages
[lhc/web/wiklou.git] / includes / specials / SpecialMovepage.php
index b29b3f9..14d671c 100644 (file)
@@ -163,6 +163,11 @@ class MovePageForm extends UnlistedSpecialPage {
                                        "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>",
                                        'moveuserpage-warning'
                                );
+                       } elseif ( $this->oldTitle->getNamespace() == NS_CATEGORY ) {
+                               $out->wrapWikiMsg(
+                                       "<div class=\"error mw-movecategorypage-warning\">\n$1\n</div>",
+                                       'movecategorypage-warning'
+                               );
                        }
 
                        $out->addWikiMsg( $wgFixDoubleRedirects ?
@@ -467,7 +472,7 @@ class MovePageForm extends UnlistedSpecialPage {
                $nt = $this->newTitle;
 
                # don't allow moving to pages with # in
-               if ( !$nt || $nt->getFragment() != '' ) {
+               if ( !$nt || $nt->hasFragment() ) {
                        $this->showForm( array( array( 'badtitletext' ) ) );
 
                        return;
@@ -593,8 +598,8 @@ class MovePageForm extends UnlistedSpecialPage {
                $dbr = wfGetDB( DB_MASTER );
                if ( $this->moveSubpages && (
                        MWNamespace::hasSubpages( $nt->getNamespace() ) || (
-                               $this->moveTalk &&
-                                       MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
+                               $this->moveTalk
+                                       && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
                        )
                ) ) {
                        $conds = array(