The war on redundant ampersand usage!
[lhc/web/wiklou.git] / install-utils.inc
index fa7b80e..7d599f5 100644 (file)
@@ -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 ) {
@@ -63,7 +63,7 @@ function copydirectory( $source, $dest ) {
 function readconsole( $prompt = '' ) {
        static $isatty = null;
        if ( is_null( $isatty ) ) {
-               if ( !function_exists( 'posix_isatty' ) || posix_isatty( STDIN ) ) {
+               if ( !function_exists( 'posix_isatty' ) || posix_isatty( 0 /*STDIN*/ ) ) {
                        $isatty = true;
                } else {
                        $isatty = false;
@@ -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 );
@@ -110,7 +110,7 @@ function dbsource( $fname, $db = false ) {
 # Obsolete, use Database::fieldExists()
 function field_exists( $table, $field ) {
        $fname = 'Update script: field_exists';
-       $db =& wfGetDB( DB_SLAVE );
+       $db = wfGetDB( DB_SLAVE );
        $res = $db->query( "DESCRIBE $table", $fname );
        $found = false;