add a check to the setup page for the php calendar extension

Signed-off-by: Rob Ostensen <rob@boxacle.net>
This commit is contained in:
Rob Ostensen 2011-09-13 15:45:23 -05:00 committed by Andrew McMillan
parent b947e1c7e2
commit 9dcda2abe4
2 changed files with 12 additions and 1 deletions

View File

@ -78,6 +78,13 @@ function check_ldap() {
return new CheckResult(isset($loaded_extensions['ldap'])); return new CheckResult(isset($loaded_extensions['ldap']));
} }
function check_calendar() {
global $phpinfo, $loaded_extensions;
if (!function_exists('cal_days_in_month')) return new CheckResult(false);
return new CheckResult(isset($loaded_extensions['calendar']));
}
function check_suhosin_server_strip() { function check_suhosin_server_strip() {
global $loaded_extensions; global $loaded_extensions;
@ -239,7 +246,8 @@ function build_dependencies_table( ) {
translate('PHP DateTime class') => 'check_datetime', translate('PHP DateTime class') => 'check_datetime',
translate('Suhosin "server.strip" disabled') => 'check_suhosin_server_strip', translate('Suhosin "server.strip" disabled') => 'check_suhosin_server_strip',
translate('PHP Magic Quotes GPC off') => 'check_magic_quotes_gpc', translate('PHP Magic Quotes GPC off') => 'check_magic_quotes_gpc',
translate('PHP Magic Quotes runtime off') => 'check_magic_quotes_runtime' translate('PHP Magic Quotes runtime off') => 'check_magic_quotes_runtime',
translate('PHP calendar extension available') => 'check_calendar'
); );
if ( isset($c->authenticate_hook) && isset($c->authenticate_hook['call']) && $c->authenticate_hook['call'] == 'LDAP_check') { if ( isset($c->authenticate_hook) && isset($c->authenticate_hook['call']) && $c->authenticate_hook['call'] == 'LDAP_check') {

View File

@ -754,6 +754,9 @@ msgstr ""
msgid "PHP LDAP module available" msgid "PHP LDAP module available"
msgstr "" msgstr ""
msgid "PHP calendar extension available"
msgstr ""
msgid "PHP Magic Quotes GPC off" msgid "PHP Magic Quotes GPC off"
msgstr "" msgstr ""