From: Brion Vibber Date: Fri, 6 Aug 2004 09:46:25 +0000 (+0000) Subject: Degrade gracefully: disable PHPTal-based skins on PHP 5.0 or higher. X-Git-Tag: 1.5.0alpha1~2505 X-Git-Url: http://git.cyclocoop.org/geomaker.php?a=commitdiff_plain;h=c280d5887a30c94e0c1af4b55dce4ba916d1b93b;p=lhc%2Fweb%2Fwiklou.git Degrade gracefully: disable PHPTal-based skins on PHP 5.0 or higher. Notify the user about this at setup time. --- diff --git a/config/index.php b/config/index.php index e6fb49cf68..f72d4dc83b 100644 --- a/config/index.php +++ b/config/index.php @@ -189,7 +189,16 @@ $wgConfiguring = true; $conf = new ConfigData; install_version_checks(); -print "
  • PHP " . phpversion() . " ok
  • \n"; + +print "
  • PHP " . phpversion() . ": "; +if( version_compare( phpversion(), "5.0", "lt" ) ) { + print "ok"; +} else { + print " the MonoBook skin will be disabled due to an incompatibility + between the PHPTAL template library and PHP 5. The wiki should + function normally, but with the older look and feel."; +} +print "
  • \n"; if( ini_get( "safe_mode" ) ) { ?> diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index bdfd2642f7..bd10946f8e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -351,7 +351,9 @@ $wgImageMagickConvertCommand = '/usr/bin/convert'; # PHPTal is a library for page templates. MediaWiki includes # a recent PHPTal distribution. It is required to use the # Monobook (default) skin. -$wgUsePHPTal = true; +# +# Currently it does not work on PHP5. +$wgUsePHPTal = version_compare( phpversion(), "5.0", "lt" ); if( !isset( $wgCommandLineMode ) ) { $wgCommandLineMode = false;