summaryrefslogtreecommitdiff
path: root/kolab-webclient/mnemo
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-06-07 15:44:00 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-06-07 15:44:00 (GMT)
commitf509e4a19b3264643dbc504448cb4b68e233abfd (patch)
tree53d0e7f476de9e58ad977667c845e26935f809d0 /kolab-webclient/mnemo
parentad8976810cad358a2ce750d5656caf5e005031fa (diff)
downloadserver-f509e4a19b3264643dbc504448cb4b68e233abfd.tar.gz
- Allow modifications of foreign shares.
- Update list of devices immediately rather than reading them from the share parameters. - Adapt from SYNC/ALARM to S parameter.
Diffstat (limited to 'kolab-webclient/mnemo')
-rw-r--r--kolab-webclient/mnemo/ChangeLog9
-rw-r--r--kolab-webclient/mnemo/mnemo.spec2
-rw-r--r--kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff61
3 files changed, 52 insertions, 20 deletions
diff --git a/kolab-webclient/mnemo/ChangeLog b/kolab-webclient/mnemo/ChangeLog
index 0edca73..c1b6fe9 100644
--- a/kolab-webclient/mnemo/ChangeLog
+++ b/kolab-webclient/mnemo/ChangeLog
@@ -1,3 +1,12 @@
+2010-06-07 Gunnar Wrobel <p@rdus.de>
+
+ * patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff:
+
+ - Allow modifications of foreign shares.
+ - Update list of devices immediately rather than reading them
+ from the share parameters.
+ - Adapt from SYNC/ALARM to S parameter.
+
2010-05-10 Gunnar Wrobel <p@rdus.de>
* patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff:
diff --git a/kolab-webclient/mnemo/mnemo.spec b/kolab-webclient/mnemo/mnemo.spec
index 3598e9b..ee570d4 100644
--- a/kolab-webclient/mnemo/mnemo.spec
+++ b/kolab-webclient/mnemo/mnemo.spec
@@ -1,7 +1,7 @@
# Macros
%define V_package mnemo
%define V_version 2.2.3
-%define V_release 20100510
+%define V_release 20100607
# Package Information
Name: %{V_package}
diff --git a/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff b/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff
index 6fc3dfb..ce126a3 100644
--- a/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff
+++ b/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff
@@ -8,38 +8,48 @@ Signed-off-by: Gunnar Wrobel <p@rdus.de>
diff -Naur a/lib/Forms/EditNotepad.php b/lib/Forms/EditNotepad.php
--- a/lib/Forms/EditNotepad.php 2010-05-10 08:25:30.000000000 +0200
+++ b/lib/Forms/EditNotepad.php 2010-05-10 08:28:09.000000000 +0200
-@@ -46,10 +46,38 @@
+@@ -40,16 +40,46 @@
+ parent::Horde_Form($vars, sprintf(_("Edit %s"), $notepad->get('name')));
+
+ $this->addHidden('', 'n', 'text', true);
+- $this->addVariable(_("Name"), 'name', 'text', true);
++ if ($this->_notepad->get('owner') != Auth::getAuth()) {
++ $this->addVariable(_("Name"), 'name', 'text', false, true);
++ } else {
++ $this->addVariable(_("Name"), 'name', 'text', true);
++ }
+ $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
+
$this->setButtons(array(_("Save")));
}
-+ function activeSyncSegment($devices, $default)
++ function activeSyncSegment($devices)
+ {
+ $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');
++ $this->addVariable(_("Synchronization options for ActiveSync devices"), '', 'header');
+ foreach ($devices as $id => $config) {
-+ $this->addVariable($id, 'activesync_' . $id . '_alarm', 'boolean', false);
++ $this->addVariable(sprintf("Device \"%s\"", $id), 'activesync_' . $id, 'radio', false, false, null,
++ array(array(_("does not synchronize with this notepad"), _("synchronizes with this notepad"))));
+ }
+ }
+
function execute()
{
- $this->_notepad->set('name', $this->_vars->get('name'));
+- $this->_notepad->set('name', $this->_vars->get('name'));
++ if ($this->_notepad->get('owner') == Auth::getAuth()) {
++ $this->_notepad->set('name', $this->_vars->get('name'));
++ }
$this->_notepad->set('desc', $this->_vars->get('description'));
+
+ if ($this->_vars->get('activesync_devices', '')) {
+ $params = array();
+ $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;
++ $sync = (int) $this->_vars->get('activesync_' . $id, 0);
++ if ($sync === 0 || $sync === 1 || $sync === 2) {
++ $params['activesync']['FOLDER'][$id]['S'] = $sync;
++ }
+ }
+ $this->_notepad->set('params', serialize($params));
+ }
@@ -50,7 +60,18 @@ diff -Naur a/lib/Forms/EditNotepad.php b/lib/Forms/EditNotepad.php
diff -Naur a/notepads/edit.php b/notepads/edit.php
--- a/notepads/edit.php 2010-05-10 08:25:30.000000000 +0200
+++ b/notepads/edit.php 2010-05-10 08:28:19.000000000 +0200
-@@ -51,6 +51,26 @@
+@@ -24,10 +24,6 @@
+ $notification->push($notepad, 'horde.error');
+ header('Location: ' . Horde::applicationUrl('notepads/', true));
+ exit;
+-} elseif ($notepad->get('owner') != Auth::getAuth()) {
+- $notification->push(_("You are not allowed to change this notepad."), 'horde.error');
+- header('Location: ' . Horde::applicationUrl('notepads/', true));
+- exit;
+ }
+ $form = new Mnemo_EditNotepadForm($vars, $notepad);
+
+@@ -51,6 +51,28 @@
$vars->set('name', $notepad->get('name'));
$vars->set('description', $notepad->get('desc'));
@@ -62,15 +83,17 @@ diff -Naur a/notepads/edit.php b/notepads/edit.php
+ } else {
+ $default = 0;
+ }
-+ $devices = $params['activesync']['DEVICE'];
++ require_once 'Horde/Kolab/Storage.php';
++ $folder = Kolab_Storage::getFolder('INBOX');
++ $result = $folder->getActiveSync();
++ $devices = isset($result['DEVICE']) ? $result['DEVICE'] : null;
+ 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);
++ $vars->set('activesync_' . $id, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
+ }
-+ $form->activeSyncSegment($devices, $default);
++ $form->activeSyncSegment($devices);
+ }
+}
+