X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=install-utils.inc;h=040c34dc81914ebc3a38ae96793293f6e1cc63e6;hb=28bb28f0cc4d67e9497040bad2c757fd107638a8;hp=f9842476a12fd3e068f5678f6cddc5965b879483;hpb=8d5959de56eecba0be23d69e40ba7af79ead4459;p=lhc%2Fweb%2Fwiklou.git diff --git a/install-utils.inc b/install-utils.inc index f9842476a1..040c34dc81 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -1,6 +1,9 @@ -query( $cmd ); else $res = mysql_query( $cmd ); if ( false === $res ) { - print "Query \"{$cmd}\" failed.\n"; + $err = mysql_error(); + print "Query \"{$cmd}\" failed with error code \"$err\".\n"; exit(); } @@ -120,7 +129,7 @@ function dbsource( $fname, $conn = false ) { fclose( $fp ); } - +# Obsolete, use Database::fieldExists() function field_exists( $table, $field ) { $fname = "Update script: field_exists"; $res = wfQuery( "DESCRIBE $table", $fname ); @@ -135,7 +144,7 @@ function field_exists( $table, $field ) { return $found; } - +# Obsolete Database::tableExists() function table_exists( $db ) { global $wgDBname; $res = mysql_list_tables( $wgDBname ); @@ -149,6 +158,7 @@ function table_exists( $db ) { return false; } +# Obsolete, use Database:fieldInfo() function field_info( $table, $field ) { $res = mysql_query( "SELECT * FROM $table LIMIT 1" ); $n = mysql_num_fields( $res );