gunnar: server/kolab-webclient/kronolith/patches/kronolith-2.3.3 t_kronolith_HK_GW_AnonymousiCalDownload.diff, NONE, 1.1 t_kronolith_HK_GW_ExportEventList.diff, NONE, 1.1 t_kronolith_HK_GW_HandleEmptyDates.diff, NONE, 1.1 t_kronolith_HK_UV_dateInputFieldOrder.diff, NONE, 1.1 series, 1.4, 1.5
cvs at kolab.org
cvs at kolab.org
Fri Jan 22 20:59:51 CET 2010
- Previous message: gunnar: server/php-kolab/Kolab_Storage package.info,1.1,1.2
- Next message: gunnar: server/kolab-webclient .cvsignore, 1.1, NONE ChangeLog, 1.20, NONE Makefile, 1.9, NONE kolab-webclient.spec, 1.39, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: gunnar
Update of /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3
In directory doto:/tmp/cvs-serv17664/kolab-webclient/kronolith/patches/kronolith-2.3.3
Modified Files:
series
Added Files:
t_kronolith_HK_GW_AnonymousiCalDownload.diff
t_kronolith_HK_GW_ExportEventList.diff
t_kronolith_HK_GW_HandleEmptyDates.diff
t_kronolith_HK_UV_dateInputFieldOrder.diff
Log Message:
Merge patches from the kolab_2_2 branch.
--- NEW FILE: t_kronolith_HK_GW_AnonymousiCalDownload.diff ---
From: Gunnar Wrobel <p at rdus.de>
Subject: [PATCH] t/kronolith/HK/GW/AnonymousiCalDownload
This patch allows anonymous access via kronolith/ics_kolab.php by
using a proxy user that needs to be given access to user calendars
that should be exported anonymously.
STATUS: HACK
Signed-off-by: Gunnar Wrobel <p at rdus.de>
---
horde-webmail/config/kolab.php | 4 +
ics_kolab.php | 110 +++++++++++++++++++++++++++++++++
2 files changed, 114 insertions(+), 0 deletions(-)
diff --git a/ics_kolab.php b/ics_kolab.php
new file mode 100644
index 0000000..2b81832
--- /dev/null
+++ b/ics_kolab.php
@@ -0,0 +1,110 @@
+<?php
+/**
+ * $Horde: kronolith/ics.php,v 1.5.2.10 2008/01/10 16:16:49 jan Exp $
+ *
+ * Copyright 1999-2008 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Chuck Hagenbuch <chuck at horde.org>
+ */
+
+function logout()
+{
+ Auth::clearAuth();
+ @session_destroy();
+}
+
+ at define('AUTH_HANDLER', true);
+ at define('HORDE_BASE', dirname(__FILE__) . '/..');
+require_once HORDE_BASE . '/lib/base.php';
+
+// We want to always generate UTF-8 iCalendar data.
+NLS::setCharset('UTF-8');
+
+// Determine which calendar to export.
+$calendar = Util::getFormData('c');
+if (empty($calendar) && !empty($_SERVER['PATH_INFO'])) {
+ $calendar = basename($_SERVER['PATH_INFO']);
+}
+
+// Authenticate.
+$auth = &Auth::singleton($conf['auth']['driver']);
+if (!isset($_SERVER['PHP_AUTH_USER'])) {
+ if (isset($conf['ics']['default_user'])
+ && isset($conf['ics']['default_pass'])) {
+ $user = $conf['ics']['default_user'];
+ $pass = $conf['ics']['default_pass'];
+ $proxied = true;
+ }
+} else {
+ $user = $_SERVER['PHP_AUTH_USER'];
+ $pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : null;
+}
+
+if (!isset($user) || !$auth->authenticate($user, array('password' => $pass))) {
+ header('WWW-Authenticate: Basic realm="Kronolith iCalendar Interface"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo '401 Unauthorized';
+ exit;
+}
+
+ at define('KRONOLITH_BASE', dirname(__FILE__));
+require_once KRONOLITH_BASE . '/lib/base.php';
+require_once 'Horde/Cache.php';
+require_once 'Horde/iCalendar.php';
+
+$share = $kronolith_shares->getShare($calendar);
+if (is_a($share, 'PEAR_Error')) {
+ header('HTTP/1.0 400 Bad Request');
+ echo '400 Bad Request';
+ if ($proxied) {
+ logout();
+ }
+ exit;
+}
+
+if (!$share->hasPermission(Auth::getAuth(), PERMS_READ)) {
+ header('WWW-Authenticate: Basic realm="Kronolith iCalendar Interface"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo '401 Unauthorized';
+ exit;
+}
+
+$cache = &Horde_Cache::singleton($conf['cache']['driver'], Horde::getDriverConfig('cache', $conf['cache']['driver']));
+$key = 'kronolith.ics.' . $calendar;
+
+$ics = $cache->get($key, 360);
+if (!$ics) {
+ $kronolith_driver->open(urlencode($calendar));
+ $events = $kronolith_driver->listEvents();
+
+ $iCal = new Horde_iCalendar();
+ $iCal->setAttribute('X-WR-CALNAME', String::convertCharset($share->get('name'), NLS::getCharset(), 'utf-8'));
+
+ foreach ($events as $id) {
+ $event = &$kronolith_driver->getEvent($id);
+ if (is_a($event, 'PEAR_Error')) {
+ continue;
+ }
+ $iCalEvent = $event->toiCalendar($iCal);
+ if (!empty($conf['ics']['hide_organizer'])) {
+ $iCalEvent->removeAttribute('ORGANIZER');
+ }
+ $iCal->addComponent($iCalEvent);
+ }
+
+ $ics = $iCal->exportvCalendar();
+ $cache->set($key, $ics);
+}
+
+$browser->downloadHeaders($calendar . '.ics',
+ 'text/calendar; charset=' . NLS::getCharset(),
+ true,
+ strlen($ics));
+echo $ics;
+
+if ($proxied) {
+ logout();
+}
--- NEW FILE: t_kronolith_HK_GW_ExportEventList.diff ---
From: Gunnar Wrobel <p at rdus.de>
Subject: [PATCH] t/kronolith/HK/GW/ExportEventList
Export a list of events.
STATUS: OPEN
Signed-off-by: Gunnar Wrobel <p at rdus.de>
---
imple_kolab.php | 96 +++++++++
lib/Block/eventlist.php | 243 +++++++++++++++++++++++
themes/embed.css | 51 +++++-
horde-webmail/lib/Horde/Kolab/Storage/List.php | 2 +-
4 files changed, 390 insertions(+), 2 deletions(-)
diff --git a/imple_kolab.php b/imple_kolab.php
new file mode 100644
index 0000000..65db938
--- /dev/null
+++ b/imple_kolab.php
@@ -0,0 +1,96 @@
+<?php
+/**
+ * $Horde: kronolith/imple.php,v 1.1.2.3 2008/04/25 03:50:58 chuck Exp $
+ *
+ * Copyright 2005-2008 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @author Michael Slusarz <slusarz at horde.org>
+ */
+
+function impleLogout()
+{
+ Auth::clearAuth();
+ @session_destroy();
+}
+
+ at define('AUTH_HANDLER', true);
+ at define('HORDE_BASE', dirname(__FILE__) . '/..');
+require_once HORDE_BASE . '/lib/base.php';
+
+// We want to always generate UTF-8 iCalendar data.
+NLS::setCharset('UTF-8');
+
+$auth = &Auth::singleton('kolab');
+
+if (isset($conf['ics']['default_user'])
+ && isset($conf['ics']['default_pass'])) {
+ $user = $conf['ics']['default_user'];
+ $pass = $conf['ics']['default_pass'];
+ $_SESSION = array();
+ $auth->authenticate($user,
+ array('password' =>
+ $pass));
+ register_shutdown_function('impleLogout');
+}
+
+ at define('KRONOLITH_BASE', dirname(__FILE__));
+require_once KRONOLITH_BASE . '/lib/base.php';
+require_once KRONOLITH_BASE . '/lib/Imple.php';
+
+
+$path = Util::getFormData('imple');
+if (!$path) {
+ exit;
+}
+if ($path[0] == '/') {
+ $path = substr($path, 1);
+}
+$path = explode('/', $path);
+$impleName = array_shift($path);
+
+$imple = Imple::factory($impleName);
+if (!$imple) {
+ exit;
+}
+
+$args = array();
+foreach ($path as $pair) {
+ if (strpos($pair, '=') === false) {
+ $args[$pair] = true;
+ } else {
+ list($name, $val) = explode('=', $pair);
+ $args[$name] = $val;
+ }
+}
+
+$result = $imple->handle($args);
+
+if (!empty($_SERVER['Content-Type'])) {
+ $ct = $_SERVER['Content-Type'];
+} else {
+ $ct = is_string($result) ? 'plain' : 'json';
+}
+
+switch ($ct) {
+case 'json':
+ header('Content-Type: text/x-json');
+ require_once KRONOLITH_BASE . '/lib/JSON.php';
+ echo Kronolith_Serialize_JSON::encode(String::convertCharset($result, NLS::getCharset(), 'utf-8'));
+ break;
+
+case 'plain':
+ header('Content-Type: text/plain');
+ echo $result;
+ break;
+
+case 'html':
+ header('Content-Type: text/html');
+ echo $result;
+ break;
+
+default:
+ echo $result;
+}
\ No newline at end of file
diff --git a/lib/Block/eventlist.php b/lib/Block/eventlist.php
new file mode 100644
index 0000000..420a984
--- /dev/null
+++ b/lib/Block/eventlist.php
@@ -0,0 +1,243 @@
+<?php
+
+$block_name = _("Calendar List View");
+
+/**
+ * Horde_Block_Kronolith_eventlist:: Implementation of the Horde_Block API to
+ * display a list of events.
+ *
+ * $Horde: kronolith/lib/Block/summary.php,v 1.41.2.14 2008/08/21 00:31:03 mrubinsk Exp $
+ *
+ * @package Horde_Block
+ */
+class Horde_Block_Kronolith_eventlist extends Horde_Block {
+
+ var $_app = 'kronolith';
+
+ function _params()
+ {
+ @define('KRONOLITH_BASE', dirname(__FILE__) . '/../..');
+ require_once KRONOLITH_BASE . '/lib/base.php';
+
+ $params = array('days' => array('name' => _("Days"),
+ 'type' => 'int',
+ 'default' => 42),
+ 'maxevents' => array('name' => _("Maximum number of events to display (0 = no limit)"),
+ 'type' => 'int',
+ 'default' => 0));
+
+ return $params;
+ }
+
+ /**
+ * The title to go in this block.
+ *
+ * @return string The title text.
+ */
+ function _title()
+ {
+ global $registry;
+ return '';
+ }
+
+ /**
+ * The content to go in this block.
+ *
+ * @return string The content
+ */
+ function _content()
+ {
+ global $kronolith_driver, $registry, $prefs;
+ require_once dirname(__FILE__) . '/../base.php';
+ require_once KRONOLITH_BASE . '/lib/Day.php';
+ require_once 'Horde/Prefs/CategoryManager.php';
+ require_once 'Horde/Text/Filter.php';
+
+ if (!empty($this->_params['days'])) {
+ $span = $this->_params['days'];
+ } else {
+ $span = 42;
+ }
+
+ $now = $_SERVER['REQUEST_TIME'];
+ $today = date('j');
+
+ $startDate = new Horde_Date(array('year' => date('Y'), 'month' => date('n'), 'mday' => date('j')));
+ $endDate = new Horde_Date(array('year' => date('Y'), 'month' => date('n'), 'mday' => date('j') + $span));
+ $endDate->correct();
+
+ if (isset($this->_params['calendar']) &&
+ $this->_params['calendar'] != '__all') {
+
+ $calendar = $GLOBALS['kronolith_shares']->getShare($this->_params['calendar']);
+ if (!is_a($calendar, 'PEAR_Error') && !$calendar->hasPermission(Auth::getAuth(), PERMS_SHOW)) {
+ return _("Permission Denied");
+ }
+
+ $all_events = Kronolith::listEvents($startDate,
+ $endDate,
+ array($this->_params['calendar']));
+ } else {
+ $calendars = Kronolith::listCalendars(false, PERMS_SHOW);
+ $all_events = Kronolith::listEvents($startDate,
+ $endDate,
+ array_keys($calendars));
+ }
+ if (is_a($all_events, 'PEAR_Error')) {
+ return '<em>' . $all_events->getMessage() . '</em>';
+ }
+
+ $iMax = $today + $span;
+
+ $html = '';
+ $firstday = true;
+ $olddayname = '';
+ $totalevents = 0;
+
+ $displayed = array();
+
+ for ($i = $today; $i < $iMax; ++$i) {
+ $day = new Kronolith_Day(date('n'), $i);
+
+ if ($day->isToday()) {
+ $dayname = _("Today");
+ } elseif ($day->isTomorrow()) {
+ $dayname = _("Tomorrow");
+ } elseif ($day->weekOfYear() == $startDate->weekOfYear()) {
+ $dayname = _("This week");
+ } elseif ($day->month == $startDate->month) {
+ if ($day->weekOfYear() == $startDate->weekOfYear() + 1) {
+ $dayname = _("Next week");
+ } elseif ($day->weekOfYear() == $startDate->weekOfYear() + 2) {
+ $dayname = _("Two weeks from now");
+ } elseif ($day->weekOfYear() == $startDate->weekOfYear() + 3) {
+ $dayname = _("Three weeks from now");
+ } elseif ($day->weekOfYear() == $startDate->weekOfYear() + 4) {
+ $dayname = _("Four weeks from now");
+ } elseif ($day->weekOfYear() == $startDate->weekOfYear() + 5) {
+ $dayname = _("Five weeks from now");
+ }
+ } elseif ($day->month - 1 == $startDate->month
+ || ($day->month == 1 && $startDate->month == 12)) {
+ $dayname = _("Next month");
+ } elseif ($day->year == $startDate->year) {
+ $dayname = $day->format('F');
+ } elseif ($day->year - 1 == $startDate->year) {
+ $dayname = _("Next year");
+ } else {
+ $dayname = _("After the next year");
+ }
+
+ if (empty($all_events[$day->getStamp()])) {
+ continue;
+ }
+
+ $events = &$all_events[$day->getStamp()];
+
+ $today12am = mktime(0, 0, 0,
+ $day->month,
+ $day->mday,
+ $day->year);
+ $tomorrow12am = mktime(0, 0, 0,
+ $day->month,
+ $day->mday + 1,
+ $day->year);
+ foreach ($events as $event) {
+
+ if (!empty($this->_params['maxevents']) &&
+ $totalevents >= $this->_params['maxevents']) {
+ break 2;
+ }
+
+ if ($event->end->timestamp() < $now) {
+ continue;
+ }
+ if ($dayname != $olddayname) {
+ if (!$firstday) {
+ $html .= '<tr><td colspan="3"> </td></tr>';
+ }
+ $html .= '<tr align="center"><td colspan="3" class="section">';
+ $html .= $dayname . '</td></tr>';
+ $olddayname = $dayname;
+ $firstday = false;
+ }
+
+ if (in_array($event->getId(), $displayed)) {
+ continue;
+ }
+
+ $category = $event->getCategory();
+ if (!empty($category)) {
+ $ctd = '<td class="category_bar category' . md5($category) . '" width="1%" />';
+ } else {
+ $ctd = '<td />';
+ }
+
+ if ($event->isAllDay()) {
+ $format = 'D, d M Y';
+ } else {
+ $format = 'G:i T D, d M Y';
+ }
+
+ if ($event->start->timestamp() < $now) {
+ $time = _('until') . date($format, $event->end->timestamp());
+ } else {
+ $time = date($format, $event->start->timestamp()) . _(' to ') .
+ date($format, $event->end->timestamp());
+ }
+
+ $html .= '<tr>' . $ctd . '<td class="event" style="vertical-align:top;"><div class="time">';
+
+ if ($event->start->timestamp() < $now &&
+ $event->end->timestamp() > $now) {
+ $html .= '<strong>';
+ }
+
+ $html .= $time;
+
+ if ($event->start->timestamp() < $now &&
+ $event->end->timestamp() > $now) {
+ $html .= '</strong>';
+ }
+
+ $html .= '</div><div class="location" style="vertical-align:top">';
+ $html .= $event->getLocation();
+ $html .= '</div></td><td style="vertical-align:top;" class="event"><div class="eventtitle">';
+ $html .= $event->getTitle();
+ $html .= '</div>';
+
+ $html .= '<div class="description">';
+ $desc = Text_Filter::filter($event->getDescription(), 'text2html', array('parselevel' => TEXT_HTML_MICRO, 'class' => 'text'));
+ $html .= strtr($desc, array("\n" => " ", "\r" => " "));
+ $html .= '</div>';
+
+ $html .= '</td></tr>';
+
+ $html .= '<tr>' . $ctd . '<td class="linedRow"/><td class="linedRow annotation">';
+
+ if (!empty($category)) {
+ $html .= '<div style="text-align:right;float:left;">';
+ $html .= _("Category") . ': ' . $category;
+ $html .= '</div>';
+ }
+
+ $html .= '<div style="text-align:right">';
+ $html .= _("Calendar") . ': ' . urldecode($event->getCalendar());
+ $html .= '</div>';
+
+ $html .= '</td></tr>';
+
+ $totalevents++;
+
+ $displayed[] = $event->getId();
+ }
+ }
+
+ if (empty($html)) {
+ return '<em>' . _("No events to display") . '</em>';
+ }
+
+ return '<link href="' . Horde::applicationUrl('themes/categoryCSS.php') . '" rel="stylesheet" type="text/css" /><table cellspacing="0" width="100%">' . $html . '</table>';
+ }
+
+}
diff --git a/themes/embed.css b/themes/embed.css
index 6ce8835..b084aa2 100644
--- a/themes/embed.css
+++ b/themes/embed.css
@@ -103,4 +103,53 @@ div.horde_nicetitle pre {
text-align: left;
font-size: 75%;
font-family: "Lucida Console",Courier,"Courier New";
-}
\ No newline at end of file
+}
+
+.kronolith_embedded category_bar {
+}
+
+.kronolith_embedded .eventtitle {
+ font-weight: bold;
+ padding: 5px;
+}
+
+.kronolith_embedded .leftbar {
+ border-right: 1px solid #DDDDDD;
+ padding: 4px;
+}
+
+.kronolith_embedded .location {
+ font-size: 85%;
+ padding-top: 10px;
+ margin-left: 5px;
+}
+
+.kronolith_embedded .annotation {
+ font-size: 75%;
+ padding-top: 10px;
+ padding-left: 5px;
+}
+
+.kronolith_embedded .description {
+ font-size: 85%;
+ padding-top: 10px;
+ padding-left: 5px;
+}
+
+.kronolith_embedded .time {
+ font-size: 85%;
+ margin-top: 5px;
+ padding: 5px;
+ margin-left: 5px;
+ background: #ddddff;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+.kronolith_embedded .section {
+ font-weight: bold;
+ background: #eeeeee;
+ border-bottom: 1px solid #999999;
+ color: #000000;
+ padding: 1px;
+}
--
tg: (2f74c4c..) t/kronolith/HK/GW/ExportEventList (depends on: t/dimp/H/BL/CloseContextMenu)
--
TOPGIT patch commit log
=======================
commit 8d3a749ccd7f8512708a16f196220e46d7a5cb16
Author: Gunnar Wrobel <p at rdus.de>
Date: Fri Oct 9 09:18:48 2009 +0200
Clean logout.
commit c471608f1adfa116123b913959498d5b7f8defc6
Author: Gunnar Wrobel <p at rdus.de>
Date: Fri Oct 9 08:45:58 2009 +0200
Cleaner session handling.
commit 992834cabdcc4a7aabbf566c7a5a27df639bef98
Author: Gunnar Wrobel <p at rdus.de>
Date: Wed Oct 7 22:22:07 2009 +0200
Comment.
commit 787cac7fd3a7dd282ad66596c30fc0eaf67bbe20
Author: Gunnar Wrobel <p at rdus.de>
Date: Wed Oct 7 22:19:43 2009 +0200
Export a list of events.
--- NEW FILE: t_kronolith_HK_GW_HandleEmptyDates.diff ---
From: root <Gunnar Wrobel wrobel at pardus.de>
Subject: [PATCH] t/kronolith/HK/GW/HandleEmptyDates
Enables the Kolab driver to handle empty start and/or end dates
correctly.
REF: https://issues.kolab.org/issue3656
Signed-off-by: root <Gunnar Wrobel wrobel at pardus.de>
---
lib/Driver/kolab.php | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/Driver/kolab.php b/lib/Driver/kolab.php
index de49c81..e915475 100644
--- a/lib/Driver/kolab.php
+++ b/lib/Driver/kolab.php
@@ -1134,12 +1134,18 @@ class Kronolith_Driver_kolab_wrapper_new extends Kronolith_Driver_kolab_wrapper
return $result;
}
- if (is_null($startDate)) {
+ if (empty($startDate)) {
$startDate = &new Horde_Date(array('mday' => 1, 'month' => 1, 'year' => 0000));
}
- if (is_null($endDate)) {
+ if (empty($endDate)) {
$endDate = &new Horde_Date(array('mday' => 31, 'month' => 12, 'year' => 9999));
}
+ if (!is_a($startDate, 'Horde_Date')) {
+ $startDate = &new Horde_Date($startDate);
+ }
+ if (!is_a($endDate, 'Horde_Date')) {
+ $endDate = &new Horde_Date($endDate);
+ }
$ids = array();
--
tg: (e6faeaf..) t/kronolith/HK/GW/HandleEmptyDates (depends on: t/framework/H/JS/Form/FixFormSecurityForImageUploads)
--
TOPGIT patch commit log
=======================
commit be56600b19e429f4ece1ca685c1e25550b5a02f6
Author: root <Gunnar Wrobel wrobel at pardus.de>
Date: Tue Nov 24 07:37:58 2009 +0100
Enables the Kolab driver to handle empty start and/or end dates
correctly.
REF: https://issues.kolab.org/issue3656
--- NEW FILE: t_kronolith_HK_UV_dateInputFieldOrder.diff ---
From: Soenke Schwardt-Krummrich <schwardt at univention.de>
Subject: [PATCH] t/kronolith/HK/UV/dateInputFieldOrder
Currently in kronolith the order of date input fields is hardcoded to
year-month-day. Some parts of the world usually use a different order.
The attached patch adds a user preference to specify input field order.
REFERENCE_KOLAB: https://issues.kolab.org/issue3844
REFERENCE_HORDE:
STATUS_KOLAB_2.2: UNTESTED
STATUS_KOLAB_2.3: NONE
STATUS_HORDE_KRONOLITH_2.3.3: SUBMIT
STATUS_HORDE_KRONOLITH_3.0: SUBMIT
Signed-off-by: Gunnar Wrobel <p at rdus.de>
---
horde-webmail/config/prefs.php | 17 ++++++++++-
horde-webmail/config/prefs.php.dist | 17 ++++++++++-
.../kronolith/templates/edit/edit_timespan.inc | 30 +++++++++++++------
3 files changed, 52 insertions(+), 12 deletions(-)
diff --git a/templates/edit/edit_timespan.inc b/templates/edit/edit_timespan.inc
index 9926617..05f5042 100644
--- a/templates/edit/edit_timespan.inc
+++ b/templates/edit/edit_timespan.inc
@@ -12,11 +12,16 @@
</td>
<td colspan="2" class="rightAlign"><?php echo _("On") ?> </td>
<td>
- <?php echo $event->html('start[year]') ?>
- -
- <?php echo $event->html('start[month]') ?>
- -
- <?php echo $event->html('start[day]') ?>
+ <?php
+ $dateorder = $GLOBALS['prefs']->getValue('date_input_format');
+ $dateorder = $dateorder != "" ? $dateorder : "year-month-day";
+ $dateorder = explode("-", $dateorder );
+ $datefields = array();
+ foreach ($dateorder as $fld) {
+ $datefields[] = $event->html('start['.$fld.']');
+ }
+ echo implode("-", $datefields);
+ ?>
<?php if ($GLOBALS['browser']->hasFeature('dom')): ?>
<span id="start_wday"></span>
<script type="text/javascript">
@@ -62,11 +67,16 @@
<?php echo Horde::label('end_year', _("On")) ?>
</td>
<td>
- <?php echo $event->html('end[year]') ?>
- -
- <?php echo $event->html('end[month]') ?>
- -
- <?php echo $event->html('end[day]') ?>
+ <?php
+ $dateorder = $GLOBALS['prefs']->getValue('date_input_format');
+ $dateorder = $dateorder != "" ? $dateorder : "year-month-day";
+ $dateorder = explode("-", $dateorder );
+ $datefields = array();
+ foreach ($dateorder as $fld) {
+ $datefields[] = $event->html('end['.$fld.']');
+ }
+ echo implode("-", $datefields);
+ ?>
<?php if ($GLOBALS['browser']->hasFeature('dom')): ?>
<span id="end_wday"></span>
<script type="text/javascript">
--
tg: (8d3a749..) t/kronolith/HK/UV/dateInputFieldOrder (depends on: t/kronolith/HK/GW/ExportEventList)
--
TOPGIT patch commit log
=======================
commit 09e3d2df656b820ae7fbaacce1060958e4b889b9
Author: Gunnar Wrobel <p at rdus.de>
Date: Thu Nov 5 09:26:25 2009 +0100
Imported patch from kolab/issue3844 (New user preference to specify order of date input fields)
Index: series
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3/series,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- series 22 Jan 2010 19:06:01 -0000 1.4
+++ series 22 Jan 2010 19:59:49 -0000 1.5
@@ -4,3 +4,7 @@
t_kronolith_HK_GW_FbviewRelevance.diff
t_kronolith_HK_GW_XfbAccess.diff
t_kronolith_HK_GW_SyncMLrefresh.diff
+t_kronolith_HK_GW_AnonymousiCalDownload.diff
+t_kronolith_HK_GW_ExportEventList.diff
+t_kronolith_HK_GW_HandleEmptyDates.diff
+t_kronolith_HK_UV_dateInputFieldOrder.diff
- Previous message: gunnar: server/php-kolab/Kolab_Storage package.info,1.1,1.2
- Next message: gunnar: server/kolab-webclient .cvsignore, 1.1, NONE ChangeLog, 1.20, NONE Makefile, 1.9, NONE kolab-webclient.spec, 1.39, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the commits
mailing list