From ad1c9fcec705761a78f9b2b6fcea30803c10dc00 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 30 Sep 2010 14:02:23 -0600 Subject: [PATCH] Move time_format pref to Horde --- horde/config/prefs.php.dist | 18 +++++++++++++++++- imp/config/prefs.php.dist | 16 +--------------- imp/docs/UPGRADING | 2 ++ kronolith/lib/Kronolith.php | 2 +- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/horde/config/prefs.php.dist b/horde/config/prefs.php.dist index 5a6086d39..94872e14e 100644 --- a/horde/config/prefs.php.dist +++ b/horde/config/prefs.php.dist @@ -314,7 +314,7 @@ $prefGroups['language'] = array( 'desc' => _("Set your preferred language, timezone and date preferences."), 'members' => array( 'language', 'timezone', 'twentyFour', 'date_format', - 'date_format_mini', 'first_week_day' + 'date_format_mini', 'time_format', 'first_week_day' ) ); @@ -403,6 +403,22 @@ $_prefs['date_format_mini'] = array( 'desc' => _("Choose how to display dates (abbreviated format):"), ); +// Time format +$_prefs['time_format'] = array( + 'value' => '%X', + 'type' => 'enum', + 'enum' => array( + '%X' => strftime('%X'), + '%H:%M:%S' => strftime('%H:%M:%S'), + '%I:%M:%S %p' => strftime('%I:%M:%S %p'), + '%l:%M:%S %p' => strftime('%l:%M:%S %p'), + '%H:%M' => strftime('%H:%M'), + '%I:%M%p' => strftime('%I:%M%p'), + '%l:%M%p' => strftime('%l:%M%p'), + ), + 'desc' => _("Choose how to display times:") +); + // what day should be displayed as the first day of the week? $_prefs['first_week_day'] = array( 'value' => '0', diff --git a/imp/config/prefs.php.dist b/imp/config/prefs.php.dist index c6ff87eb0..4b95072be 100644 --- a/imp/config/prefs.php.dist +++ b/imp/config/prefs.php.dist @@ -1199,7 +1199,7 @@ $prefGroups['mboxdisplay'] = array( 'desc' => _("Change display preferences such as how many messages you see on each page and how messages are sorted."), 'members' => array( 'mailbox_start', 'sortby', 'sortdir', 'sortdate', 'max_msgs', - 'from_link', 'time_format', 'atc_flag' + 'from_link', 'atc_flag' ) ); @@ -1287,20 +1287,6 @@ $_prefs['from_link'] = array( 'desc' => _("The From: column of the message should be linked:") ); -// Time format for messages dated today -$_prefs['time_format'] = array( - 'value' => '%X', - 'type' => 'enum', - 'enum' => array( - '%X' => strftime('%X'), - '%H:%M:%S' => strftime('%H:%M:%S'), - '%I:%M:%S %p' => strftime('%I:%M:%S %p'), - '%H:%M' => strftime('%H:%M'), - '%I:%M%p' => strftime('%I:%M%p'), - ), - 'desc' => _("Format of message dates in the mailbox view for messages dated today") -); - // Display attachment information in mailbox list. // Disabled by default, and not shown to user, because this display requires // substantial overhead to parse the message structures of all message in diff --git a/imp/docs/UPGRADING b/imp/docs/UPGRADING index 0060dd441..29e6d6bf3 100644 --- a/imp/docs/UPGRADING +++ b/imp/docs/UPGRADING @@ -66,6 +66,8 @@ The following configuration options have been removed: Preferences ----------- +The 'time_format' preference has been moved to Horde. + The following preferences are no longer used and may be safely removed from your ``config/prefs.php`` file and your preferences backend:: diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 567d78315..95a1bbe19 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -152,7 +152,7 @@ class Kronolith 'date_format' => str_replace(array('%e', '%d', '%a', '%A', '%m', '%h', '%b', '%B', '%y', '%Y'), array('d', 'dd', 'ddd', 'dddd', 'MM', 'MMM', 'MMM', 'MMMM', 'yy', 'yyyy'), Horde_Nls::getLangInfo(D_FMT)), - 'time_format' => $prefs->getValue('twentyFour') ? 'HH:mm' : 'hh:mm tt', + 'time_format' => $prefs->getValue('time_format'), 'status' => array('tentative' => self::STATUS_TENTATIVE, 'confirmed' => self::STATUS_CONFIRMED, 'cancelled' => self::STATUS_CANCELLED, -- 2.11.0