summaryrefslogtreecommitdiff
path: root/install-utils.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-05-16 20:58:53 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-05-16 20:58:53 +0000
commitcecb985bee3bdd252e1b8dc0bd500b37cd52be01 (patch)
tree17266aa237742640aabee7856f0202317a45d540 /install-utils.inc
parent0bac06c301f2a83edb0236e4c2434da16848d549 (diff)
Aktualisierung auf MediaWiki 1.10.0
Plugins angepasst und verbessert kleine Korrekturen am Design
Diffstat (limited to 'install-utils.inc')
-rw-r--r--install-utils.inc50
1 files changed, 3 insertions, 47 deletions
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;
-}
-
?>