From 0d48107e1b120149235f842895e673316afbff91 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 16 Apr 2007 14:09:35 +0000 Subject: [PATCH] Fix 9220: remove obsoletes functions in install-utils.inc --- RELEASE-NOTES | 1 + install-utils.inc | 44 -------------------------------------------- 2 files changed, 1 insertion(+), 44 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7802316429..b87a58a565 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -316,6 +316,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 8599) Correct localized names of zh-variants * (bug 3366) Require skins based on SkinTemplate to override the skinname property. +* (bug 9220) Removed obsoletes functions in install-utils.inc. == Maintenance == diff --git a/install-utils.inc b/install-utils.inc index 7d599f50b8..4e1aad27a3 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -106,48 +106,4 @@ function dbsource( $fname, $db = false ) { exit(1); } } - -# Obsolete, use Database::fieldExists() -function field_exists( $table, $field ) { - $fname = 'Update script: field_exists'; - $db = wfGetDB( DB_SLAVE ); - $res = $db->query( "DESCRIBE $table", $fname ); - $found = false; - - while ( $row = $db->fetchObject( $res ) ) { - if ( $row->Field == $field ) { - $found = true; - break; - } - } - return $found; -} - -# Obsolete Database::tableExists() -function table_exists( $db ) { - global $wgDBname; - $res = mysql_list_tables( $wgDBname ); - if( !$res ) { - echo "** " . mysql_error() . "\n"; - return false; - } - for( $i = mysql_num_rows( $res ) - 1; $i--; $i > 0 ) { - if( mysql_tablename( $res, $i ) == $db ) return true; - } - return false; -} - -# Obsolete, use Database:fieldInfo() -function field_info( $table, $field ) { - $res = mysql_query( "SELECT * FROM $table LIMIT 1" ); - $n = mysql_num_fields( $res ); - for( $i = 0; $i < $n; $i++ ) { - $meta = mysql_fetch_field( $res, $i ); - if( $field == $meta->name ) { - return $meta; - } - } - return false; -} - ?> -- 2.20.1