diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2013-01-18 16:46:04 +0100 |
commit | 63601400e476c6cf43d985f3e7b9864681695ed4 (patch) | |
tree | f7846203a952e38aaf66989d0a4702779f549962 /tests/selenium/SeleniumConfig.php | |
parent | 8ff01378c9e0207f9169b81966a51def645b6a51 (diff) |
Update to MediaWiki 1.20.2
this update includes:
* adjusted Arch Linux skin
* updated FluxBBAuthPlugin
* patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024
Diffstat (limited to 'tests/selenium/SeleniumConfig.php')
-rw-r--r-- | tests/selenium/SeleniumConfig.php | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/tests/selenium/SeleniumConfig.php b/tests/selenium/SeleniumConfig.php index b1487154..04cf8d88 100644 --- a/tests/selenium/SeleniumConfig.php +++ b/tests/selenium/SeleniumConfig.php @@ -24,12 +24,7 @@ class SeleniumConfig { throw new MWException( "Unable to read local Selenium Settings from " . $seleniumConfigFile . "\n" ); } - if ( !defined( 'PHP_VERSION_ID' ) || - ( PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 3 ) ) { - $configArray = self::parse_5_2_ini_file( $seleniumConfigFile ); - } else { - $configArray = parse_ini_file( $seleniumConfigFile, true ); - } + $configArray = parse_ini_file( $seleniumConfigFile, true ); if ( $configArray === false ) { throw new MWException( "Error parsing " . $seleniumConfigFile . "\n" ); } @@ -61,35 +56,6 @@ class SeleniumConfig { return true; } - /** - * PHP 5.2 parse_ini_file() doesn't have support for array keys. - * This function parses simple ini files with such syntax using just - * 5.2 functions. - */ - private static function parse_5_2_ini_file( $ConfigFile ) { - $file = fopen( $ConfigFile, "rt" ); - if ( !$file ) { - return false; - } - $header = ''; - - $configArray = array(); - - while ( ( $line = fgets( $file ) ) !== false ) { - $line = strtok( $line, "\r\n" ); - - if ( !$line || $line[0] == ';' ) continue; - - if ( $line[0] == '[' && substr( $line, -1 ) == ']' ) { - $header = substr( $line, 1, -1 ); - $configArray[$header] = array(); - } else { - $configArray[$header] = array_merge_recursive( $configArray[$header], self::parse_ini_line( $line ) ); - } - } - return $configArray; - } - private static function parse_ini_line( $iniLine ) { static $specialValues = array( 'false' => false, 'true' => true, 'null' => null ); list( $key, $value ) = explode( '=', $iniLine, 2 ); |