Merge "Add missing subjectspace pages to watchlist on update."
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 26 Dec 2013 18:42:34 +0000 (18:42 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 26 Dec 2013 18:42:34 +0000 (18:42 +0000)
includes/installer/MysqlUpdater.php

index b3ea964..9dfbff8 100644 (file)
@@ -394,6 +394,16 @@ class MysqlUpdater extends DatabaseUpdater {
                                'wl_notificationtimestamp' => 'wl_notificationtimestamp'
                        ), array( 'NOT (wl_namespace & 1)' ), __METHOD__, 'IGNORE' );
                $this->output( "done.\n" );
+
+               $this->output( "Adding missing watchlist subject page rows... " );
+               $this->db->insertSelect( 'watchlist', 'watchlist',
+                       array(
+                               'wl_user' => 'wl_user',
+                               'wl_namespace' => 'wl_namespace & ~1',
+                               'wl_title' => 'wl_title',
+                               'wl_notificationtimestamp' => 'wl_notificationtimestamp'
+                       ), array( 'wl_namespace & 1' ), __METHOD__, 'IGNORE' );
+               $this->output( "done.\n" );
        }
 
        function doSchemaRestructuring() {