From cecb985bee3bdd252e1b8dc0bd500b37cd52be01 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 16 May 2007 20:58:53 +0000 Subject: Aktualisierung auf MediaWiki 1.10.0 Plugins angepasst und verbessert kleine Korrekturen am Design --- install-utils.inc | 50 +++----------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) (limited to 'install-utils.inc') diff --git a/install-utils.inc b/install-utils.inc index 84fbc8e8..4e1aad27 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -28,7 +28,7 @@ function install_version_checks() { global $wgCommandLineMode; $wgCommandLineMode = true; umask( 000 ); - set_time_limit( 0 ); + @set_time_limit( 0 ); } function copyfile( $sdir, $name, $ddir, $perms = 0664 ) { @@ -94,10 +94,10 @@ function dbsource( $fname, $db = false ) { // Try $wgDatabase, which is used in the install and update scripts global $wgDatabase; if ( isset( $wgDatabase ) ) { - $db =& $wgDatabase; + $db = $wgDatabase; } else { // No? Well, we must be outside of those scripts, so use the standard method - $db =& wfGetDB( DB_MASTER ); + $db = wfGetDB( DB_MASTER ); } } $error = $db->sourceFile( $fname ); @@ -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; -} - ?> -- cgit v1.2.2