Remove lcc_title field from linkscc table, if necessary,
authorJerome Jamnicky <jeronim@users.mediawiki.org>
Mon, 24 May 2004 01:03:30 +0000 (01:03 +0000)
committerJerome Jamnicky <jeronim@users.mediawiki.org>
Mon, 24 May 2004 01:03:30 +0000 (01:03 +0000)
upon 1.3 install/upgrade.

config/index.php
maintenance/update2.php
maintenance/updaters.inc
update.php

index ad1cc16..b464287 100644 (file)
@@ -400,6 +400,7 @@ if( $conf->posted && ( 0 == count( $errs ) ) ) {
                        do_interwiki_update(); flush();
                        do_index_update(); flush();
                        do_linkscc_update(); flush();
+                       do_linkscc_1_3_update(); flush();
                        do_hitcounter_update(); flush();
                        do_recentchanges_update(); flush();
                        convertLinks(); flush();
index afd07e0..7d4a199 100644 (file)
@@ -12,6 +12,7 @@ do_ipblocks_update(); flush();
 do_interwiki_update(); flush();
 do_index_update(); flush();
 do_linkscc_update(); flush();
+do_linkscc_1_3_update(); flush();
 do_hitcounter_update(); flush();
 do_recentchanges_update(); flush();
 do_user_real_name_update(); flush();
index d557ebb..9f5b4a2 100644 (file)
@@ -102,6 +102,19 @@ function do_linkscc_update() {
        }
 }
 
+function do_linkscc_1_3_update() {
+       // Update linkscc table to 1.3 schema if necessary
+       global $wgDatabase, $wgVersion;
+       if( ( strpos( "1.3", $wgVersion ) === 0 ) && $wgDatabase->tableExists( "linkscc" )
+               && $wgDatabase->fieldExists( "linkscc", "lcc_title" ) ) {
+               echo "Altering lcc_title field from linkscc table... ";
+               dbsource( "maintenance/archives/patch-linkscc-1.3.sql", $wgDatabase );
+               echo "ok\n";
+       } else {
+               echo "...linkscc is up to date, or does not exist. Good.\n";
+       }
+}
+
 function do_hitcounter_update() {
        // Create hitcounter if necessary
        global $wgDatabase;
index 150e01b..94dba69 100644 (file)
@@ -63,6 +63,7 @@ do_ipblocks_update();
 do_interwiki_update();
 do_index_update();
 do_linkscc_update();
+do_linkscc_1_3_update();
 do_hitcounter_update();
 do_recentchanges_update();
 do_user_real_name_update();