readded min php version constant instead of simple variable

This commit is contained in:
Steffen Schröder 2014-06-12 15:21:33 +02:00
parent 4db11ed322
commit 9524dd08c3

View File

@ -62,16 +62,15 @@ logMessage('Starting ManiaControl...');
*/
function checkRequirements() {
// Check for min PHP version
$minPhpVersion = '5.4';
define('MIN_PHP_VERSION', '5.4');
$phpVersion = phpversion();
$message = "Checking for minimum required PHP-Version '{$minPhpVersion}'... ";
if ($phpVersion < $minPhpVersion) {
$message .= "{$minPhpVersion} TOO OLD VERSION!";
logMessage($message);
logMessage(" -- Make sure that you install at least PHP {$minPhpVersion}!");
$message = 'Checking for minimum required PHP-Version' . MIN_PHP_VERSION . ' ...';
if ($phpVersion < MIN_PHP_VERSION) {
logMessage($message . $phpVersion . ' TOO OLD VERSION!');
logMessage(' -- Make sure that you install at least PHP ' . MIN_PHP_VERSION . '!');
exit();
}
logMessage($message . "'{$minPhpVersion}' OK!");
logMessage($message . MIN_PHP_VERSION . ' OK!');
// Check for MySQLi
$message = 'Checking for installed MySQLi ... ';