From a58285fd06c8113c45377c655dd43cef6337e815 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 11 Jan 2007 19:06:07 +0000 Subject: Aktualisierung auf MediaWiki 1.9.0 --- install-utils.inc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'install-utils.inc') diff --git a/install-utils.inc b/install-utils.inc index 6f8637c3..84fbc8e8 100644 --- a/install-utils.inc +++ b/install-utils.inc @@ -61,12 +61,9 @@ function copydirectory( $source, $dest ) { } function readconsole( $prompt = '' ) { - static $isatty = null, $fp = null; - if ( is_null( $fp ) ) { - $fp = fopen( 'php://stdin', 'r' ); - } + static $isatty = null; if ( is_null( $isatty ) ) { - if ( !function_exists( 'posix_isatty' ) || posix_isatty( $fp ) ) { + if ( !function_exists( 'posix_isatty' ) || posix_isatty( 0 /*STDIN*/ ) ) { $isatty = true; } else { $isatty = false; @@ -79,10 +76,10 @@ function readconsole( $prompt = '' ) { if ( $isatty ) { print $prompt; } - if ( feof( $fp ) ) { + if ( feof( STDIN ) ) { return false; } - $st = fgets($fp, 1024); + $st = fgets(STDIN, 1024); if ($st === false) return false; $resp = trim( $st ); return $resp; -- cgit v1.2.2