mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Add PHP version check to setup.php
This commit is contained in:
1 parent
3bf44378fa
commit
d42c3dc186
2 files changed
+17
No files matched your search
@@ -286,6 +286,19 @@ function check_davical_version() {
|
||||
return $result;
|
||||
}
|
||||
|
||||
function check_php_version() {
|
||||
global $c;
|
||||
|
||||
$result = new CheckResult(version_compare(phpversion(), $c->minimum_php_version, '>='));
|
||||
if ( ! $result->getOK() ) {
|
||||
$result->setDescription( sprintf(i18n('Minimum: %s, Currently: %s'), $c->minimum_php_version, phpversion()) );
|
||||
$result->setClass('dep_fail');
|
||||
} else {
|
||||
$result->setDescription( sprintf(i18n('Passed: %s'), phpversion() . ' >= ' . $c->minimum_php_version) );
|
||||
}
|
||||
return $result;
|
||||
|
||||
}
|
||||
|
||||
function check_awl_version() {
|
||||
global $c;
|
||||
@@ -337,6 +350,7 @@ function build_dependencies_table( ) {
|
||||
|
||||
$dependencies = array(
|
||||
translate('Current DAViCal version ') => 'check_davical_version',
|
||||
translate('PHP version ') => 'check_php_version',
|
||||
translate('AWL Library version ') => 'check_awl_version',
|
||||
translate('PHP not using Apache Filter mode') => 'check_real_php',
|
||||
translate('PHP PDO module available') => 'check_pdo',
|
||||
|
||||
Reference in new issue
Block a user