summaryrefslogtreecommitdiff
path: root/mw-config/index.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /mw-config/index.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'mw-config/index.php')
-rw-r--r--mw-config/index.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/mw-config/index.php b/mw-config/index.php
index 570b426e..a6cebc39 100644
--- a/mw-config/index.php
+++ b/mw-config/index.php
@@ -20,9 +20,18 @@
* @file
*/
+// Bail if PHP is too low
+if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
+ // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
+ require dirname( dirname( __FILE__ ) ) . '/includes/PHPVersionError.php';
+ wfPHPVersionError( 'mw-config/index.php' );
+}
+
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
define( 'MEDIAWIKI_INSTALL', true );
+// Resolve relative to regular MediaWiki root
+// instead of mw-config subdirectory.
chdir( dirname( __DIR__ ) );
require dirname( __DIR__ ) . '/includes/WebStart.php';
@@ -34,6 +43,15 @@ function wfInstallerMain() {
$installer = InstallerOverrides::getWebInstaller( $wgRequest );
if ( !$installer->startSession() ) {
+
+ if ( $installer->request->getVal( "css" ) ) {
+ // Do not display errors on css pages
+ $installer->outputCss();
+ exit;
+ }
+
+ $errors = $installer->getPhpErrors();
+ $installer->showError( 'config-session-error', $errors[0] );
$installer->finish();
exit;
}