Commit dfe5adb9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Bumped PHP min version to 5.4 and cleaned min PHP version handling

Showing with 12 additions and 14 deletions
+12 -14
......@@ -274,8 +274,8 @@ function dummy_error_handler()
}
/* Bail out for incompatible/old PHP versions */
if (!version_compare(phpversion(), "5.2.0", ">=")) {
echo "PHP version needs to be 5.2.0 or above to run FusionDirectory. Aborted.";
if (!version_compare(phpversion(), PHP_MIN_VERSION, ">=")) {
echo "PHP version needs to be ".PHP_MIN_VERSION." or above to run FusionDirectory. Aborted.";
exit();
}
......
......@@ -70,4 +70,9 @@ define ("FD_VERSION", "1.0.12-fixes"); /*! Define FusionDirectory version */
*/
define ("CONFIGRDN", "cn=config,ou=fusiondirectory,"); /*! Define FusionDirectory config object */
/*!
* \brief Minimum PHP version
*/
define ("PHP_MIN_VERSION", "5.4.0");
?>
......@@ -64,12 +64,12 @@ class Step_Checks extends setupStep
$config_checks = array();
/* PHP version check */
$N = _("Checking PHP version");
$D = sprintf(_("PHP must be of version %s or above."), "5.2.0");
$S = _("Please upgrade to a supported version.");
$R = $this->check_php_version();
$N = _('Checking PHP version');
$D = sprintf(_('PHP must be of version %s or above.'), PHP_MIN_VERSION);
$S = _('Please upgrade to a supported version.');
$R = version_compare(phpversion(), PHP_MIN_VERSION, '>=');
$M = TRUE;
$basic_checks[] = array("NAME" => $N , "DESC" => $D , "RESULT" => $R , "SOLUTION" => $S , "MUST" => $M );
$basic_checks[] = array('NAME' => $N , 'DESC' => $D , 'RESULT' => $R , 'SOLUTION' => $S , 'MUST' => $M );
/* Check for LDAP extension */
$N = msgPool::checkingFor("LDAP");
......@@ -229,13 +229,6 @@ class Step_Checks extends setupStep
}
$this->is_completed = !$failed;
}
/* Check if current PHP version is compatible
with the current version of FusionDirectory */
function check_php_version()
{
return version_compare(phpversion(), '5.2.0', '>=');
}
}
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment