Index: trunk/phase3/maintenance/install.php |
— | — | @@ -20,12 +20,18 @@ |
21 | 21 | * @see wfWaitForSlaves() |
22 | 22 | */ |
23 | 23 | |
| 24 | +if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.2.3' ) < 0 ) ) { |
| 25 | + echo "You are using PHP version " . phpversion() . " but MediaWiki needs PHP 5.2.3 or higher. ABORTING.\n" . |
| 26 | + "Check if you have a newer php executable with a different name, such as php5.\n"; |
| 27 | + die( 1 ); |
| 28 | +} |
| 29 | + |
24 | 30 | define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' ); |
25 | 31 | |
26 | 32 | require_once( dirname( dirname( __FILE__ ) )."/maintenance/Maintenance.php" ); |
27 | 33 | |
28 | 34 | class CommandLineInstaller extends Maintenance { |
29 | | - public function __construct() { |
| 35 | + function __construct() { |
30 | 36 | parent::__construct(); |
31 | 37 | global $IP; |
32 | 38 | |
— | — | @@ -54,7 +60,7 @@ |
55 | 61 | $this->addOption( 'env-checks', "Run environment checks only, don't change anything" ); |
56 | 62 | } |
57 | 63 | |
58 | | - public function execute() { |
| 64 | + function execute() { |
59 | 65 | global $IP, $wgTitle; |
60 | 66 | $siteName = isset( $this->mArgs[0] ) ? $this->mArgs[0] : "Don't care"; // Will not be set if used with --env-checks |
61 | 67 | $adminName = isset( $this->mArgs[1] ) ? $this->mArgs[1] : null; |
— | — | @@ -76,7 +82,7 @@ |
77 | 83 | } |
78 | 84 | } |
79 | 85 | |
80 | | - protected function validateParamsAndArgs() { |
| 86 | + function validateParamsAndArgs() { |
81 | 87 | if ( !$this->hasOption( 'env-checks' ) ) { |
82 | 88 | parent::validateParamsAndArgs(); |
83 | 89 | } |