gunnar: server/php-kolab/Kolab_Storage/patches/Kolab_Storage-0.4.0 t_framework_HK_UV_NoDuplicationOnUidChange.diff, NONE, 1.1

cvs at kolab.org cvs at kolab.org
Sat Feb 27 23:59:56 CET 2010


Author: gunnar

Update of /kolabrepository/server/php-kolab/Kolab_Storage/patches/Kolab_Storage-0.4.0
In directory doto:/tmp/cvs-serv7153/php-kolab/Kolab_Storage/patches/Kolab_Storage-0.4.0

Added Files:
	t_framework_HK_UV_NoDuplicationOnUidChange.diff 
Log Message:
kolab/issue3238 (Double Entries with SyncML when the folder uid validity changes) 

--- NEW FILE: t_framework_HK_UV_NoDuplicationOnUidChange.diff ---
REF: https://issues.kolab.org/issue3238
--- a/a/a/lib/Horde/Kolab/Storage/Data.php	2008-10-20 16:27:27.000000000 +0200
+++ a/a/a/lib/Horde/Kolab/Storage/Data.php	2008-10-20 16:38:34.000000000 +0200
@@ -400,7 +400,17 @@
                         $this->_updateHistory($object['uid'], $mod_ts, 'modify');
                         $modified[] = $object['uid'];
                     } else {
-                        $this->_updateHistory($object['uid'], $mod_ts, 'add');
+                        // entries that should be added to the history MUST not
+                        // have an existing entry in the history!! otherwise
+                        // they are just marked as "modified"
+                        $history = &Horde_History::singleton();
+                        $history_id = $this->_app_consts['application'] . ':'
+                            . $this->_share_uid . ':' . $object_uid;
+                        if ($history->getActionTimestamp ($history_id, 'add') != 0) {
+                            $this->_updateHistory($object['uid'], $mod_ts, 'add');
+                        } else {
+                            $this->_updateHistory($object['uid'], $mod_ts, 'modify');
+                        }
                     }
                 } else {
                     $this->_cache->ignore($id);





More information about the commits mailing list