diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2007-01-11 19:06:07 +0000 |
commit | a58285fd06c8113c45377c655dd43cef6337e815 (patch) | |
tree | dfe31d3d12652352fe44890b4811eda0728faefb /install-utils.inc | |
parent | 20194986f6638233732ba1fc3e838f117d3cc9ea (diff) |
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'install-utils.inc')
-rw-r--r-- | install-utils.inc | 11 |
1 files changed, 4 insertions, 7 deletions
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; |