From: Aaron Schulz Date: Fri, 31 Aug 2007 12:38:45 +0000 (+0000) Subject: *Add $wgExtPGNewFields. Allowing for extensions to use only $wgExtNewFields when... X-Git-Tag: 1.31.0-rc.0~51583 X-Git-Url: http://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=aa182e887f5c5bc81a68b76ff3a309594dedfda4;p=lhc%2Fweb%2Fwiklou.git *Add $wgExtPGNewFields. Allowing for extensions to use only $wgExtNewFields when PG/mysql updaters use different formats (column attributes vs directory to query file) is just asking for mistakes to be made. --- diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index e8fd2061f2..aeab487131 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -89,6 +89,7 @@ $wgNewFields = array( # $wgDBtype should be checked to specifiy the proper file $wgExtNewTables = array(); // table, dir $wgExtNewFields = array(); // table, column, dir +$wgExtPGNewFields = array(); // table, column attributes; for PostgreSQL $wgExtNewIndexes = array(); // table, index, dir function rename_table( $from, $to, $patch ) { @@ -1497,7 +1498,7 @@ function do_postgres_updates() { } else echo "... archive.ar_deleted already exists\n"; - global $wgExtNewTables, $wgExtNewFields, $wgExtNewIndexes; + global $wgExtNewTables, $wgExtPGNewFields, $wgExtNewIndexes; # Add missing extension tables foreach ( $wgExtNewTables as $nt ) { if ($wgDatabase->tableExists($nt[0])) { @@ -1509,7 +1510,7 @@ function do_postgres_updates() { dbsource($nt[1]); } # Add missing extension fields - foreach ( $wgExtNewFields as $nc ) { + foreach ( $wgExtPGNewFields as $nc ) { $fi = $wgDatabase->fieldInfo($nc[0], $nc[1]); if (!is_null($fi)) { echo "... column $nc[0].$nc[1] already exists\n";