aboutsummaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2008-12-31 07:14:34 +0000
committerJim Hu <jimhu@users.sourceforge.net>2008-12-31 07:14:34 +0000
commit891159af439013fb1efd7c36799640ca30633f4a (patch)
tree93eed619c43d9c73aaea9a06cb21d833c1e5dddd /functions
parent14bb051462a6614ef58ff066bc4bebd568c7808a (diff)
downloadphpicalendar-891159af439013fb1efd7c36799640ca30633f4a.tar.gz
phpicalendar-891159af439013fb1efd7c36799640ca30633f4a.tar.bz2
phpicalendar-891159af439013fb1efd7c36799640ca30633f4a.zip
timeFormat select in preferences (feature request 1401779)
Diffstat (limited to 'functions')
-rw-r--r--functions/init/configs.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/functions/init/configs.php b/functions/init/configs.php
index f3028b1..d47f367 100644
--- a/functions/init/configs.php
+++ b/functions/init/configs.php
@@ -27,7 +27,6 @@ $phpiCal_config->setProperty('gridLength', $g);
if ($phpiCal_config->cookie_uri == '') {
$phpiCal_config->setProperty('cookie_uri', $_SERVER['SERVER_NAME'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'], '/')) );
if ($phpiCal_config->cookie_uri == 'localhost') $phpiCal_config->setProperty('cookie_uri', '');
-;
}
$cookie_name = 'phpicalendar_'.basename($phpiCal_config->default_path);
if (isset($_COOKIE[$cookie_name]) && !isset($_POST['unset'])) {
@@ -55,6 +54,23 @@ if (is_file($lang_file)) {
include_once($lang_file);
}
+if (isset($phpicalendar['cookie_timeformat']) && $phpicalendar['cookie_timeformat'] !=''){
+ $timeFormat = $phpicalendar['cookie_timeformat'];
+echo "here $timeFormat<pre>";print_r($phpicalendar);
+ switch($timeFormat){
+ case 'h:i':
+ case 'h:i A':
+ $timeFormat_small = 'h:i';
+ break;
+ case 'G:i':
+ case 'H:i':
+ $timeFormat_small = 'G:i';
+ break;
+ default:
+ $timeFormat_small = 'g:i';
+ }
+}
+
$template = $phpiCal_config->template;
$fillTime = $phpiCal_config->day_start;

© 2014-2024 Faster IT GmbH | imprint | privacy policy