Merge "API: Make jsonfm the default output format"
[lhc/web/wiklou.git] / includes / installer / DatabaseUpdater.php
index b25ea09..6e0c37f 100644 (file)
@@ -31,6 +31,7 @@ require_once __DIR__ . '/../../maintenance/Maintenance.php';
  * @since 1.17
  */
 abstract class DatabaseUpdater {
+       protected static $updateCounter = 0;
 
        /**
         * Array of updates to perform on the database
@@ -297,9 +298,9 @@ abstract class DatabaseUpdater {
         * @param string $tableName The table name
         * @param string $oldIndexName The old index name
         * @param string $newIndexName The new index name
+        * @param string $sqlPath The path to the SQL change path
         * @param bool $skipBothIndexExistWarning Whether to warn if both the old
         * and the new indexes exist. [facultative; by default, false]
-        * @param string $sqlPath The path to the SQL change path
         */
        public function renameExtensionIndex( $tableName, $oldIndexName, $newIndexName,
                $sqlPath, $skipBothIndexExistWarning = false
@@ -460,7 +461,8 @@ abstract class DatabaseUpdater {
                if ( !$this->canUseNewUpdatelog() ) {
                        return;
                }
-               $key = "updatelist-$version-" . time();
+               $key = "updatelist-$version-" . time() . self::$updateCounter;
+               self::$updateCounter++;
                $this->db->insert( 'updatelog',
                        array( 'ul_key' => $key, 'ul_value' => serialize( $updates ) ),
                        __METHOD__ );
@@ -907,7 +909,7 @@ abstract class DatabaseUpdater {
                if ( $wgLocalisationCacheConf['manualRecache'] ) {
                        $this->rebuildLocalisationCache();
                }
-               MessageBlobStore::clear();
+               MessageBlobStore::getInstance()->clear();
                $this->output( "done.\n" );
        }
 
@@ -984,6 +986,7 @@ abstract class DatabaseUpdater {
 
        /**
         * Updates the timestamps in the transcache table
+        * @return bool
         */
        protected function doUpdateTranscacheField() {
                if ( $this->updateRowExists( 'convert transcache field' ) ) {