* Fix upgrade from 1.4 due to version number check breakage
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Aug 2005 07:25:16 +0000 (07:25 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 24 Aug 2005 07:25:16 +0000 (07:25 +0000)
* Fix upgrade from 1.4 with no old revisions

RELEASE-NOTES
maintenance/namespaceDupes.php
maintenance/updaters.inc
maintenance/userDupes.inc

index c460f6d..1b23527 100644 (file)
@@ -50,6 +50,8 @@ Misc work going on.....
   to create or update pages.
 * Fix table prefix usage in Block::enumBlocks
 * (bug 3244) Fix remote image loading hack, JavaScript injection on MSIE
+* Fix upgrade from 1.4 due to version number check breakage [for rc future]
+* Fix upgrade from 1.4 with no old revisions
 
 
 === Caveats ===
index ccbdd52..35d325c 100644 (file)
@@ -141,8 +141,7 @@ class NamespaceConflictChecker {
        }
        
        function newSchema() {
-               global $wgVersion;
-               return version_compare( $wgVersion, '1.5alpha', 'ge' );
+               return class_exists( 'Revision' );
        }
 }
 
index 07bc251..6ce2de6 100644 (file)
@@ -363,7 +363,7 @@ function do_schema_restructuring() {
                echo "......Locking tables.\n";
                $wgDatabase->query( "LOCK TABLES $page WRITE, $revision WRITE, $old WRITE, $cur WRITE", $fname );
 
-               $maxold = $wgDatabase->selectField( 'old', 'max(old_id)', '', $fname );
+               $maxold = intval( $wgDatabase->selectField( 'old', 'max(old_id)', '', $fname ) );
                echo wfTimestamp();
                echo "......maxold is {$maxold}\n";
 
index db2487d..c2fc6b1 100644 (file)
@@ -160,8 +160,7 @@ class UserDupes {
         * @access private
         */
        function newSchema() {
-               global $wgVersion;
-               return version_compare( $wgVersion, '1.5alpha', 'ge' );
+               return class_exists( 'Revision' );
        }
        
        /**