Typo/logic error in move page watchlist update.
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 14 Aug 2004 18:23:50 +0000 (18:23 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 14 Aug 2004 18:23:50 +0000 (18:23 +0000)
Bug 50: after moving a watched page the page is not in watch list any more
http://bugzilla.wikipedia.org/show_bug.cgi?id=50

includes/Title.php

index 60a2d1b..5973f66 100644 (file)
@@ -911,7 +911,6 @@ class Title {
                        $this->moveToNewTitle( $nt, $newid );
                }
 
-
                # Fixing category links (those without piped 'alternate' names) to be sorted under the new title
                
                $dbw =& wfGetDB( DB_MASTER );
@@ -919,7 +918,6 @@ class Title {
                        " WHERE cl_from=" . $dbw->addQuotes( $this->getArticleID() ) .
                        " AND cl_sortkey=" . $dbw->addQuotes( $this->getPrefixedText() );
                $dbw->query( $sql, "SpecialMovepage::doSubmit" );
-               
 
                # Update watchlists
                
@@ -928,7 +926,7 @@ class Title {
                $oldtitle = $this->getDBkey();
                $newtitle = $nt->getDBkey();
 
-               if( $oldnamespace != $newnamespace && $oldtitle != $newtitle ) {
+               if( $oldnamespace != $newnamespace || $oldtitle != $newtitle ) {
                        WatchedItem::duplicateEntries( $this, $nt );
                }