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

parent c3bb734b
...@@ -274,8 +274,8 @@ function dummy_error_handler() ...@@ -274,8 +274,8 @@ function dummy_error_handler()
} }
/* Bail out for incompatible/old PHP versions */ /* Bail out for incompatible/old PHP versions */
if (!version_compare(phpversion(), "5.2.0", ">=")) { if (!version_compare(phpversion(), PHP_MIN_VERSION, ">=")) {
echo "PHP version needs to be 5.2.0 or above to run FusionDirectory. Aborted."; echo "PHP version needs to be ".PHP_MIN_VERSION." or above to run FusionDirectory. Aborted.";
exit(); exit();
} }
......
...@@ -70,4 +70,9 @@ define ("FD_VERSION", "1.0.12-fixes"); /*! Define FusionDirectory version */ ...@@ -70,4 +70,9 @@ define ("FD_VERSION", "1.0.12-fixes"); /*! Define FusionDirectory version */
*/ */
define ("CONFIGRDN", "cn=config,ou=fusiondirectory,"); /*! Define FusionDirectory config object */ 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 ...@@ -64,12 +64,12 @@ class Step_Checks extends setupStep
$config_checks = array(); $config_checks = array();
/* PHP version check */ /* PHP version check */
$N = _("Checking PHP version"); $N = _('Checking PHP version');
$D = sprintf(_("PHP must be of version %s or above."), "5.2.0"); $D = sprintf(_('PHP must be of version %s or above.'), PHP_MIN_VERSION);
$S = _("Please upgrade to a supported version."); $S = _('Please upgrade to a supported version.');
$R = $this->check_php_version(); $R = version_compare(phpversion(), PHP_MIN_VERSION, '>=');
$M = TRUE; $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 */ /* Check for LDAP extension */
$N = msgPool::checkingFor("LDAP"); $N = msgPool::checkingFor("LDAP");
...@@ -229,13 +229,6 @@ class Step_Checks extends setupStep ...@@ -229,13 +229,6 @@ class Step_Checks extends setupStep
} }
$this->is_completed = !$failed; $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', '>=');
}
} }
?> ?>
Markdown is supported
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