readded min php version constant instead of simple variable
This commit is contained in:
parent
4db11ed322
commit
9524dd08c3
@ -62,19 +62,18 @@ logMessage('Starting ManiaControl...');
|
|||||||
*/
|
*/
|
||||||
function checkRequirements() {
|
function checkRequirements() {
|
||||||
// Check for min PHP version
|
// Check for min PHP version
|
||||||
$minPhpVersion = '5.4';
|
define('MIN_PHP_VERSION', '5.4');
|
||||||
$phpVersion = phpversion();
|
$phpVersion = phpversion();
|
||||||
$message = "Checking for minimum required PHP-Version '{$minPhpVersion}'... ";
|
$message = 'Checking for minimum required PHP-Version' . MIN_PHP_VERSION . ' ...';
|
||||||
if ($phpVersion < $minPhpVersion) {
|
if ($phpVersion < MIN_PHP_VERSION) {
|
||||||
$message .= "{$minPhpVersion} TOO OLD VERSION!";
|
logMessage($message . $phpVersion . ' TOO OLD VERSION!');
|
||||||
logMessage($message);
|
logMessage(' -- Make sure that you install at least PHP ' . MIN_PHP_VERSION . '!');
|
||||||
logMessage(" -- Make sure that you install at least PHP {$minPhpVersion}!");
|
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
logMessage($message . "'{$minPhpVersion}' OK!");
|
logMessage($message . MIN_PHP_VERSION . ' OK!');
|
||||||
|
|
||||||
// Check for MySQLi
|
// Check for MySQLi
|
||||||
$message = 'Checking for installed MySQLi... ';
|
$message = 'Checking for installed MySQLi ... ';
|
||||||
if (!extension_loaded('mysqli')) {
|
if (!extension_loaded('mysqli')) {
|
||||||
logMessage($message . 'NOT FOUND!');
|
logMessage($message . 'NOT FOUND!');
|
||||||
logMessage(" -- You don't have MySQLi installed! Check: http://www.php.net/manual/en/mysqli.installation.php");
|
logMessage(" -- You don't have MySQLi installed! Check: http://www.php.net/manual/en/mysqli.installation.php");
|
||||||
@ -83,7 +82,7 @@ function checkRequirements() {
|
|||||||
logMessage($message . 'FOUND!');
|
logMessage($message . 'FOUND!');
|
||||||
|
|
||||||
// Check for cURL
|
// Check for cURL
|
||||||
$message = 'Checking for installed cURL... ';
|
$message = 'Checking for installed cURL ... ';
|
||||||
if (!extension_loaded('curl')) {
|
if (!extension_loaded('curl')) {
|
||||||
logMessage($message . 'NOT FOUND!');
|
logMessage($message . 'NOT FOUND!');
|
||||||
logMessage(" -- You don't have cURL installed! Check: http://www.php.net/manual/en/curl.installation.php");
|
logMessage(" -- You don't have cURL installed! Check: http://www.php.net/manual/en/curl.installation.php");
|
||||||
|
Loading…
Reference in New Issue
Block a user