summaryrefslogtreecommitdiff
path: root/kolab-webclient/mnemo
diff options
context:
space:
mode:
authorGunnar Wrobel <wrobel@pardus.de>2010-02-28 09:27:23 (GMT)
committerGunnar Wrobel <wrobel@pardus.de>2010-02-28 09:27:23 (GMT)
commitf6a295cc714501ca0573bdbc7412d8b33c3f1baf (patch)
treec318fdc2fd0725eb0135b16439c317f33f902b93 /kolab-webclient/mnemo
parent5464030d7702a375cfc19dc6e87e131ce76e54a9 (diff)
downloadserver-f6a295cc714501ca0573bdbc7412d8b33c3f1baf.tar.gz
MFB: kolab/issue3237 (Double Sync with SyncML when using external client)
Diffstat (limited to 'kolab-webclient/mnemo')
-rw-r--r--kolab-webclient/mnemo/mnemo.spec2
-rw-r--r--kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff72
2 files changed, 73 insertions, 1 deletions
diff --git a/kolab-webclient/mnemo/mnemo.spec b/kolab-webclient/mnemo/mnemo.spec
index fe07b86..80ee30e 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 20100122
+%define V_release 20100228
# Package Information
Name: %{V_package}
diff --git a/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff b/kolab-webclient/mnemo/patches/mnemo-2.2.3/t_mnemo_HK_UV_SyncMLSyncBackendBeforeSync.diff
new file mode 100644
index 0000000..d677acd
--- /dev/null
+++ b/kolab-webclient/mnemo/patches/mnemo-2.2.3/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;
++}