6.0.0-git
2019-04-23

[#8338] missing 'uid' in turba_browse
Summary missing 'uid' in turba_browse
Queue Turba
Queue Version 2.3.1
Type Bug
State Not A Bug
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester rpolli (at) babel (dot) it
Created 2009-06-10 (3604 days ago)
Due
Updated 2009-08-13 (3540 days ago)
Assigned 2009-06-12 (3602 days ago)
Resolved 2009-06-12 (3602 days ago)
Milestone
Patch No

History
2009-08-13 13:30:59 turbagurl (at) hotmail (dot) com Comment #9 Reply to this comment
we r missing inbox mail for the other broswer
2009-06-16 10:48:51 rpolli (at) babel (dot) it Comment #8 Reply to this comment
It's confusing because there are currently two ways to identify and
retrieve objects, for historical reasons.
are you going to leave one out in future releases?
UIDs are used for any
synchronization purposes i.e. for external data exchange,
so why not to expose methods to show a map of <uid, ..properties..> ?

It enables webservices to be a replacement of sql access.



if I create a cached browser for horde contacts/calendar, I got 
browsing data <Id, modified, ..> but when i insert an item, the ws 
returns the uid..

As cache checks etag/timestamp to (in)validate the item, actual horde 
ws behavior makes impossible to create a "fast" cache, forcing to 
continuously use getActionTimestamp on each item (with the overhead 
due to the amount of ws call - about 1sec each).
IDs are used for internal exchange.
and webdav



Thx,

R.
2009-06-16 10:22:06 Jan Schneider Comment #7 Reply to this comment
It's confusing because there are currently two ways to identify and 
retrieve objects, for historical reasons. UIDs are used for any 
synchronization purposes i.e. for external data exchange, IDs are used 
for internal exchange.
2009-06-14 09:37:55 rpolli (at) babel (dot) it Comment #6 Reply to this comment
Objects
are identified by their IDs, not their UIDs in those contexts.
so, is there a way to retrieve objects data by ID? (ex. export, 
getActionTimestamp, ..)

All webservice methods are UID-oriented but this one..to me it's quite 
confusing :)



Thx for your time,

R.




2009-06-12 21:16:39 Chuck Hagenbuch State ⇒ Not A Bug
Patch ⇒ No
 
2009-06-12 21:11:42 Jan Schneider Comment #5 Reply to this comment
The purpose of the browse methods is to provide directory-like listing 
for directory services like WebDAV, obrowser, etc. Objects are 
identified by their IDs, not their UIDs in those contexts. It's *not* 
there to list complete objects, use the list* and export methods for 
that.
2009-06-12 21:05:21 Chuck Hagenbuch Comment #4
Assigned to Jan Schneider
Reply to this comment
Jan, am I missing something here?



Also, what relevance do the calendar methods have to the Turba 
(address book) API? Though all the _browse ones should be as 
consistent as possible...
2009-06-12 18:03:21 rpolli (at) babel (dot) it Comment #3 Reply to this comment
When you say missing, what would mean that the UID should be present
here?
yes. As the calendar.import method returns the UID of the item, it's 
an important information to retrieve.
I don't know what it would mean for webdav, for example, and I
don't see it in any of our other _browse method implementations.
uid should be return on demand, not by default, like the "modified", 
"created" fields..

let me know if you need some examples..








2009-06-12 15:41:54 Chuck Hagenbuch Comment #2
State ⇒ Feedback
Reply to this comment
When you say missing, what would mean that the UID should be present 
here? I don't know what it would mean for webdav, for example, and I 
don't see it in any of our other _browse method implementations.
2009-06-10 14:50:23 Jan Schneider Milestone ⇒
 
2009-06-10 12:30:37 rpolli (at) babel (dot) it Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Summary ⇒ missing 'uid' in turba_browse
Queue ⇒ Turba
Milestone ⇒ 2.3.1
Patch ⇒ Yes
Reply to this comment
missing 'uid' in turba_browse properties.

note: if contact->getValue issues a call instead of a simple attribute 
retrieval from an object, it could be optimized with a function like:

if  ! defined(item[guid]):

    item[guid] = item.getValue('_uid')



return item[guid]



Patch follows. The same in kronolith and maybe in all other modules...



@@ -580,6 +584,9 @@

              if (in_array('created', $properties)) {

                  $results[$key]['created'] = 
_turba_getActionTimestamp($contact->getValue('__uid'), 'add');

              }

+           if (in_array('uid', $properties)) { // rpolli .,+2

+               $results[$key]['uid'] = $contact->getValue('__uid');

+           }

          }



          return $results;


Saved Queries