diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /includes/PHPVersionError.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/PHPVersionError.php')
-rw-r--r-- | includes/PHPVersionError.php | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/includes/PHPVersionError.php b/includes/PHPVersionError.php index 02d3546f..f481650c 100644 --- a/includes/PHPVersionError.php +++ b/includes/PHPVersionError.php @@ -32,26 +32,35 @@ * - index.php * - load.php * - api.php + * - mw-config/index.php * - cli * * @note Since we can't rely on anything, the minimum PHP versions and MW current * version are hardcoded here */ function wfPHPVersionError( $type ) { - $mwVersion = '1.22'; + $mwVersion = '1.24'; $minimumVersionPHP = '5.3.2'; - $phpVersion = phpversion(); + $phpVersion = PHP_VERSION; $protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0'; - $message = "MediaWiki $mwVersion requires at least PHP version $minimumVersionPHP, you are using PHP $phpVersion."; + $message = "MediaWiki $mwVersion requires at least " + . "PHP version $minimumVersionPHP, you are using PHP $phpVersion."; + if ( $type == 'cli' ) { - $finalOutput = "You are using PHP version $phpVersion but MediaWiki $mwVersion needs PHP $minimumVersionPHP or higher. ABORTING.\n" . - "Check if you have a newer php executable with a different name, such as php5.\n"; - } elseif ( $type == 'index.php' ) { + $finalOutput = "You are using PHP version $phpVersion " + . "but MediaWiki $mwVersion needs PHP $minimumVersionPHP or higher. ABORTING.\n" + . "Check if you have a newer php executable with a different name, such as php5.\n"; + } elseif ( $type == 'index.php' || $type == 'mw-config/index.php' ) { $pathinfo = pathinfo( $_SERVER['SCRIPT_NAME'] ); + if ( $type == 'mw-config/index.php' ) { + $dirname = dirname( $pathinfo['dirname'] ); + } else { + $dirname = $pathinfo['dirname']; + } $encLogo = htmlspecialchars( - str_replace( '//', '/', $pathinfo['dirname'] . '/' ) . - 'skins/common/images/mediawiki.png' + str_replace( '//', '/', $dirname . '/' ) . + 'resources/assets/mediawiki.png' ); header( "$protocol 500 MediaWiki configuration Error" ); @@ -97,9 +106,9 @@ function wfPHPVersionError( $type ) { </p> <p> If for some reason you are unable to upgrade your PHP version, you will need to - <a href="http://www.mediawiki.org/wiki/Download">download</a> an older version + <a href="https://www.mediawiki.org/wiki/Download">download</a> an older version of MediaWiki from our website. See our - <a href="http://www.mediawiki.org/wiki/Compatibility#PHP">compatibility page</a> + <a href="https://www.mediawiki.org/wiki/Compatibility#PHP">compatibility page</a> for details of which versions are compatible with prior versions of PHP. </p> </div> |