gunnar: server/kolab-webclient/kronolith/patches/kronolith-2.3.3 t_kronolith_HK_GW_ZpushAnnotations.diff, NONE, 1.1 series, 1.9, 1.10
cvs at kolab.org
cvs at kolab.org
Thu May 6 09:10:08 CEST 2010
Author: gunnar
Update of /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3
In directory doto:/tmp/cvs-serv14778/kolab-webclient/kronolith/patches/kronolith-2.3.3
Modified Files:
series
Added Files:
t_kronolith_HK_GW_ZpushAnnotations.diff
Log Message:
Support setting Zpush configuration values.
--- NEW FILE: t_kronolith_HK_GW_ZpushAnnotations.diff ---
From: Gunnar Wrobel <p at rdus.de>
Subject: [PATCH] t/kronolith/HK/GW/ZpushAnnotations
Allows to modify the Zpush configuration.
Signed-off-by: Gunnar Wrobel <p at rdus.de>
diff -Naur a/calendars/edit.php b/calendars/edit.php
--- a/calendars/edit.php 2010-05-04 22:00:35.670897983 +0200
+++ b/calendars/edit.php 2010-05-06 07:45:36.406431213 +0200
@@ -46,7 +46,6 @@
$notification->push(sprintf(_("The calendar \"%s\" has been saved."), $original_name), 'horde.success');
}
}
-
header('Location: ' . Horde::applicationUrl('calendars/', true));
exit;
}
@@ -57,6 +56,23 @@
if (isset($params['fbrelevance'])) {
$vars->set('fbrelevance', $params['fbrelevance']);
}
+if (isset($params['activesync'])) {
+ if ($params['activesync']['NAMESPACE'] == Horde_Kolab_Storage_Namespace::PERSONAL) {
+ $default = 1;
+ } else {
+ $default = 0;
+ }
+ $devices = $params['activesync']['DEVICE'];
+ if (!empty($devices)) {
+ $folders = $params['activesync']['FOLDER'];
+ $vars->set('activesync_devices', implode('|', array_keys($devices)));
+ foreach ($devices as $id => $config) {
+ $vars->set('activesync_' . $id . '_sync', isset($folders[$id]['SYNC']) ? $folders[$id]['SYNC'] : $default);
+ $vars->set('activesync_' . $id . '_alarm', isset($folders[$id]['ALARM']) ? $folders[$id]['ALARM'] : $default);
+ }
+ $form->activeSyncSegment($devices, $default);
+ }
+}
$title = $form->getTitle();
require KRONOLITH_TEMPLATES . '/common-header.inc';
require KRONOLITH_TEMPLATES . '/menu.inc';
diff -Naur a/lib/Forms/EditCalendar.php b/lib/Forms/EditCalendar.php
--- a/lib/Forms/EditCalendar.php 2010-05-04 22:00:36.210910903 +0200
+++ b/lib/Forms/EditCalendar.php 2010-05-05 10:30:48.073386331 +0200
@@ -49,13 +49,40 @@
$this->setButtons(array(_("Save")));
}
+ function activeSyncSegment($devices, $default)
+ {
+ $this->addHidden('', 'activesync_devices', 'text');
+ $this->addVariable('', '', 'spacer');
+ $this->addVariable(_("Synchronize this calendar with the following ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
+ $this->addVariable($id, 'activesync_' . $id . '_sync', 'boolean', false);
+ }
+ $this->addVariable('', '', 'spacer');
+ $this->addVariable(_("Activate alarms for this calendar on the following ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
+ }
+ }
+
function execute()
{
$original_name = $this->_calendar->get('name');
$new_name = $this->_vars->get('name');
$this->_calendar->set('name', $new_name);
$this->_calendar->set('desc', $this->_vars->get('description'));
- $this->_calendar->set('params', serialize(array('fbrelevance' => (int) $this->_vars->get('fbrelevance', 0))));
+ $params = array('fbrelevance' => (int) $this->_vars->get('fbrelevance', 0));
+
+ if ($this->_vars->get('activesync_devices', '')) {
+ $ids = explode('|', $this->_vars->get('activesync_devices', ''));
+ foreach ($ids as $id) {
+ $sync = $this->_vars->get('activesync_' . $id . '_sync');
+ $alarm = $this->_vars->get('activesync_' . $id . '_alarm');
+ $params['activesync']['FOLDER'][$id]['SYNC'] = empty($sync) ? 0 : 1;
+ $params['activesync']['FOLDER'][$id]['ALARM'] = empty($alarm) ? 0 : 1;
+ }
+ }
+
+ $this->_calendar->set('params', serialize($params));
if ($original_name != $new_name) {
$result = $GLOBALS['kronolith_driver']->rename($original_name, $new_name);
Index: series
===================================================================
RCS file: /kolabrepository/server/kolab-webclient/kronolith/patches/kronolith-2.3.3/series,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- series 9 Mar 2010 08:21:07 -0000 1.9
+++ series 6 May 2010 07:10:06 -0000 1.10
@@ -11,4 +11,5 @@
t_kronolith_HK_UV_searchTabs.diff
t_kronolith_HK_GW_AdaptStartDateOfRecurrencesWhenEditing.diff
t_kronolith_HK_UV_SyncMLSyncBackendBeforeSync.diff
-t_SyncML_UV_RecurringEventsWeekCount.diff
\ No newline at end of file
+t_SyncML_UV_RecurringEventsWeekCount.diff
+t_kronolith_HK_GW_ZpushAnnotations.diff
More information about the commits
mailing list