6.0.0-alpha12
6/18/25

[#9278] Bug In SyncML calendar for Nokia devices
Summary Bug In SyncML calendar for Nokia devices
Queue Horde Base
Queue Version 3.3.9
Type Bug
State Not A Bug
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester fabio.bas (at) officineinformatiche (dot) net
Created 09/30/2010 (5375 days ago)
Due
Updated 10/06/2010 (5369 days ago)
Assigned 10/05/2010 (5370 days ago)
Resolved 10/06/2010 (5369 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
10/06/2010 01:38:29 PM Michael Rubinsky Comment #6
State ⇒ Not A Bug
Reply to this comment
Not sure how you got numeric guids here, the Sql backend code actually 
creates non-numeric values here also. Closing, this is not a bug.
10/06/2010 07:24:13 AM fabio (dot) bas (at) officineinformatiche (dot) net Comment #5 Reply to this comment
You are right, if the suids (the array keys) are not numeric this is 
not an issue.
I was currently testing using the dummy "Sql" Syncml backend included 
in horde, using numerical suids.
10/05/2010 09:44:21 PM Michael Rubinsky Comment #4
State ⇒ Feedback
Reply to this comment
Actually, looking at this closer, this doesn't make sense to me. Why 
are the array keys getting "cleared and renumbered"? array_merge 
should not reorder the keys unless they are numeric, which guids are 
not. The tasks and the calendar entries shouldn't have equal guids 
either, so there should be no overwriting.  Or do I misunderstand the 
issue?
10/05/2010 04:10:27 PM fabio (dot) bas (at) officineinformatiche (dot) net Comment #3 Reply to this comment
If it's of any interests, in my tests i used a Nokia E71
10/05/2010 03:51:15 PM Michael Rubinsky Comment #2
State ⇒ Assigned
Assigned to Michael Rubinsky
Reply to this comment
I don't have a nokia device to test/verify with, but the explanation 
sounds reasonable.

09/30/2010 06:42:17 PM fabio (dot) bas (at) officineinformatiche (dot) net Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Bug In SyncML calendar for Nokia devices
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
Reply to this comment
in lib/SyncML/Sync.php, function "createSyncOutput", the variables 
$this->_server_adds, $this->_server_replaces and 
$this->_server_deletes contains arrays mapping suids (array keys) to 
cuids (array values), like this:
---
array (
   suid1 => cuid1,
   suid2 => cuid2
);
---
If  $device->handleTasksInCalendar() is true and the current database 
being synced is "calendar", those array will be merged to the 
corrispective add, replace and delete arrays for the "tasks" database.
The merge is made using array_merge, that clears the keys re-numbering 
them; this causes the wrong suids being retrieved from the database. 
Merging the arrays using the += operator solves the issue (if the 
device is reported to handle tasks in calendar, no key collision is 
supposed to be possible)
---
                 $this->_server_adds += $this->_server_task_adds;
                 $this->_server_replaces += $this->_server_replaces;
                 $this->_server_deletes += $this->_server_deletes;
---
---

Saved Queries