From 9dcda2abe4b94abc991757ca64a681fa8681d6be Mon Sep 17 00:00:00 2001 From: Rob Ostensen Date: Tue, 13 Sep 2011 15:45:23 -0500 Subject: [PATCH] add a check to the setup page for the php calendar extension Signed-off-by: Rob Ostensen --- htdocs/setup.php | 10 +++++++++- po/messages.pot | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/setup.php b/htdocs/setup.php index beb1522c..1e8030c1 100644 --- a/htdocs/setup.php +++ b/htdocs/setup.php @@ -78,6 +78,13 @@ function check_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() { global $loaded_extensions; @@ -239,7 +246,8 @@ function build_dependencies_table( ) { translate('PHP DateTime class') => 'check_datetime', translate('Suhosin "server.strip" disabled') => 'check_suhosin_server_strip', 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') { diff --git a/po/messages.pot b/po/messages.pot index f6876a9d..9187a873 100644 --- a/po/messages.pot +++ b/po/messages.pot @@ -754,6 +754,9 @@ msgstr "" msgid "PHP LDAP module available" msgstr "" +msgid "PHP calendar extension available" +msgstr "" + msgid "PHP Magic Quotes GPC off" msgstr ""