summaryrefslogtreecommitdiff
path: root/kolab-webclient/mnemo
diff options
context:
space:
mode:
authorGunnar Wrobel <p@rdus.de>2010-11-26 14:47:25 (GMT)
committerGunnar Wrobel <p@rdus.de>2010-12-02 03:23:43 (GMT)
commite0576163e8f351f36d388b9723114703150566f2 (patch)
treedf76e0de487552bd2b628b6b0c5dc0a2ff61a3e9 /kolab-webclient/mnemo
parent1e10e18240345d4db0fe3868580a8f5549d6ac26 (diff)
downloadserver-e0576163e8f351f36d388b9723114703150566f2.tar.gz
Update kronolith to 2.2.4.
Diffstat (limited to 'kolab-webclient/mnemo')
-rw-r--r--kolab-webclient/mnemo/ChangeLog4
-rw-r--r--kolab-webclient/mnemo/configuration/mnemo-2.2.4/10-kolab_conf_base.php4
-rw-r--r--kolab-webclient/mnemo/configuration/mnemo-2.2.4/conf.php13
-rw-r--r--kolab-webclient/mnemo/mnemo.spec4
-rw-r--r--kolab-webclient/mnemo/patches/mnemo-2.2.4/series2
-rw-r--r--kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_GW_ZpushAnnotations.diff104
-rw-r--r--kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff72
-rw-r--r--kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_conf.php.template15
-rw-r--r--kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_prefs.php.template15
9 files changed, 231 insertions, 2 deletions
diff --git a/kolab-webclient/mnemo/ChangeLog b/kolab-webclient/mnemo/ChangeLog
index c1b6fe9..f112165 100644
--- a/kolab-webclient/mnemo/ChangeLog
+++ b/kolab-webclient/mnemo/ChangeLog
@@ -1,3 +1,7 @@
+2010-11-26 Gunnar Wrobel <p@rdus.de>
+
+ * mnemo.spec: Update to 2.2.4.
+
2010-06-07 Gunnar Wrobel <p@rdus.de>
* patches/mnemo-2.2.3/t_mnemo_HK_GW_ZpushAnnotations.diff:
diff --git a/kolab-webclient/mnemo/configuration/mnemo-2.2.4/10-kolab_conf_base.php b/kolab-webclient/mnemo/configuration/mnemo-2.2.4/10-kolab_conf_base.php
new file mode 100644
index 0000000..3e3f827
--- /dev/null
+++ b/kolab-webclient/mnemo/configuration/mnemo-2.2.4/10-kolab_conf_base.php
@@ -0,0 +1,4 @@
+<?php
+
+$conf['storage']['driver'] = 'kolab';
+$conf['utils']['gnupg'] = '/usr/bin/gpg';
diff --git a/kolab-webclient/mnemo/configuration/mnemo-2.2.4/conf.php b/kolab-webclient/mnemo/configuration/mnemo-2.2.4/conf.php
new file mode 100644
index 0000000..2cfda07
--- /dev/null
+++ b/kolab-webclient/mnemo/configuration/mnemo-2.2.4/conf.php
@@ -0,0 +1,13 @@
+<?php
+/* CONFIG START. DO NOT CHANGE ANYTHING IN OR AFTER THIS LINE. */
+// $Horde: mnemo/config/conf.xml,v 1.17.10.1 2007/12/20 14:17:38 jan Exp $
+$conf['storage']['driver'] = 'kolab';
+$conf['utils']['gnupg'] = '/usr/bin/gpg';
+$conf['menu']['print'] = true;
+$conf['menu']['import_export'] = true;
+$conf['menu']['apps'] = array();
+/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
+if (file_exists(dirname(__FILE__) . '/conf.local.php')) {
+ require(dirname(__FILE__) . '/conf.local.php');
+}
+
diff --git a/kolab-webclient/mnemo/mnemo.spec b/kolab-webclient/mnemo/mnemo.spec
index ee570d4..e886622 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 20100607
+%define V_version 2.2.4
+%define V_release 20101126
# Package Information
Name: %{V_package}
diff --git a/kolab-webclient/mnemo/patches/mnemo-2.2.4/series b/kolab-webclient/mnemo/patches/mnemo-2.2.4/series
new file mode 100644
index 0000000..0c9a9c9
--- /dev/null
+++ b/kolab-webclient/mnemo/patches/mnemo-2.2.4/series
@@ -0,0 +1,2 @@
+t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff
+t_mnemo_HK_GW_ZpushAnnotations.diff
diff --git a/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_GW_ZpushAnnotations.diff b/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_GW_ZpushAnnotations.diff
new file mode 100644
index 0000000..257fbec
--- /dev/null
+++ b/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_GW_ZpushAnnotations.diff
@@ -0,0 +1,104 @@
+From: Gunnar Wrobel <p@rdus.de>
+Subject: [PATCH] t/mnemo/HK/GW/ZpushAnnotations
+
+Allows to modify the Zpush configuration.
+
+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
+@@ -40,16 +40,47 @@
+ 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);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, true);
++ } else {
++ $this->addVariable(_("Name"), 'name', 'text', true);
++ $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
++ }
+- $this->addVariable(_("Description"), 'description', 'longtext', false, false, null, array(4, 60));
+
+ $this->setButtons(array(_("Save")));
+ }
+
++ function activeSyncSegment($devices)
++ {
++ $this->addHidden('', 'activesync_devices', 'text');
++ $this->addVariable('', '', 'spacer');
++ $this->addVariable(_("Synchronization options for ActiveSync devices"), '', 'header');
++ foreach ($devices as $id => $config) {
++ $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'));
++ 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 = (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));
++ }
++
+ $result = $this->_notepad->save();
+ if (is_a($result, 'PEAR_Error')) {
+ return PEAR::raiseError(sprintf(_("Unable to save notepad \"%s\": %s"), $id, $result->getMessage()));
+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
+@@ -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'));
++
++$params = @unserialize($notepad->get('params'));
++if (isset($params['activesync'])) {
++ if ($params['activesync']['NAMESPACE'] == Horde_Kolab_Storage_Namespace::PERSONAL) {
++ $default = 1;
++ } else {
++ $default = 0;
++ }
++ 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, isset($folders[$id]['S']) ? $folders[$id]['S'] : $default);
++ }
++ $form->activeSyncSegment($devices);
++ }
++}
++
+ $title = $form->getTitle();
+ require MNEMO_TEMPLATES . '/common-header.inc';
+ require MNEMO_TEMPLATES . '/menu.inc';
diff --git a/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff b/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff
new file mode 100644
index 0000000..d677acd
--- /dev/null
+++ b/kolab-webclient/mnemo/patches/mnemo-2.2.4/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff
@@ -0,0 +1,72 @@
+From: root <Gunnar Wrobel wrobel@pardus.de>
+Subject: [PATCH] t/SyncML/HK/GW/DoubleSyncFix
+
+Horde is currently agnostic of external clients to the storage backend used by
+Horde/Kolab. For SyncML any storage changes need to get logged in order to be
+exchanged with the mobile clients.
+
+Currently the Kolab drivers within Horde will create the necessary changelog.
+But this currently only happens after Synchronization started. Which means that
+you need to sync twice in order to get changes from an external client if you
+did not log in via Horde after changing something with an external client.
+
+The attached patch has been provided by Univention but needs some cleanup to go
+in upstream. We mainly need a clean library call in the Horde application
+libraries that will be called for synchronization.
+
+REF: https://issues.kolab.org/issue3237
+
+Signed-off-by: root <Gunnar Wrobel wrobel@pardus.de>
+
+diff --git a/lib/api.php b/lib/api.php
+index 202b85e..1450bb1 100644
+--- a/lib/api.php
++++ b/lib/api.php
+@@ -70,6 +70,11 @@ $_services['replace'] = array(
+ 'type' => 'boolean'
+ );
+
++$_services['synchronize'] = array(
++ 'args' => array(),
++ 'type' => 'boolean'
++);
++
+ /**
+ * Returns a list of available permissions.
+ *
+@@ -526,3 +531,35 @@ function _mnemo_replace($uid, $content, $contentType)
+ return PEAR::raiseError(sprintf(_("Unsupported Content-Type: %s"),$contentType));
+ }
+ }
++
++/**
++ * Synchronizes mnemo with the IMAP backend
++ *
++ * @return boolean False if something went wrong
++ */
++function _mnemo_synchronize()
++{
++ require_once dirname(__FILE__) . '/base.php';
++
++ /* Make sure we have a valid notepad. */
++ if (empty($notepad)) {
++ $notepad = Mnemo::getDefaultNotepad();
++ }
++
++ if (!array_key_exists($notepad,
++ Mnemo::listNotepads(false, PERMS_READ))) {
++ return False;
++ }
++
++ $storage = &Mnemo_Driver::singleton($notepad);
++ if (get_class ($storage) == 'Mnemo_Driver_kolab' &&
++ get_class ($storage->_wrapper) == 'Mnemo_Driver_kolab_wrapper_new') {
++
++ $storage->_wrapper->connect ();
++ if (get_class ($storage->_wrapper->_store) == 'Kolab_IMAP') {
++ $storage->_wrapper->_store->_synchronize ();
++ }
++ }
++
++ return True;
++}
diff --git a/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_conf.php.template b/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_conf.php.template
new file mode 100644
index 0000000..a2e8387
--- /dev/null
+++ b/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_conf.php.template
@@ -0,0 +1,15 @@
+KOLAB_META_START
+TARGET=@@@mnemo_confdir@@@/conf.d/20-kolab_local.php
+PERMISSIONS=0400
+OWNERSHIP=@@@webserver_usr@@@:@@@webserver_grp@@@
+KOLAB_META_END
+<?php
+/*
+@@@warning@@@
+*/
+
+/* This file can be used to customize your kolab-webclient installation. */
+/* Anything you add to this configuration file will override settings */
+/* from @@@mnemo_confdir@@@/conf.php
+ Please refer to that file to see which settings you can influence via */
+/* this template. */
diff --git a/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_prefs.php.template b/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_prefs.php.template
new file mode 100644
index 0000000..900cb49
--- /dev/null
+++ b/kolab-webclient/mnemo/templates/mnemo-2.2.4/webclient-mnemo_prefs.php.template
@@ -0,0 +1,15 @@
+KOLAB_META_START
+TARGET=@@@mnemo_confdir@@@/prefs.d/20-kolab_local.php
+PERMISSIONS=0400
+OWNERSHIP=@@@webserver_usr@@@:@@@webserver_grp@@@
+KOLAB_META_END
+<?php
+/*
+@@@warning@@@
+*/
+
+/* This file can be used to customize your kolab-webclient installation. */
+/* Anything you add to this configuration file will override settings */
+/* from @@@mnemo_confdir@@@/prefs.php
+ Please refer to that file to see which settings you can influence via */
+/* this template. */