6.0.0-alpha14
7/2/25

[#8275] turba/lib/api.php added 'modified' webservice like kronolith
Summary turba/lib/api.php added 'modified' webservice like kronolith
Queue Turba
Queue Version 2.3.1
Type Enhancement
State No Feedback
Priority 2. Medium
Owners
Requester rpolli (at) babel (dot) it
Created 05/14/2009 (5893 days ago)
Due
Updated 06/28/2009 (5848 days ago)
Assigned
Resolved 06/28/2009 (5848 days ago)
Milestone
Patch No

History
06/28/2009 04:25:03 PM Chuck Hagenbuch State ⇒ No Feedback
 
05/14/2009 05:47:46 PM Jan Schneider Comment #2
State ⇒ Feedback
Milestone ⇒
Patch ⇒ No
Reply to this comment
Kronolit has a 'modified' method that returns the last_modified of
one entry using only one call.
Because we need it internally in Kronolith, but we don't need it in Turba.
05/14/2009 12:59:48 PM rpolli (at) babel (dot) it Comment #1
Priority ⇒ 2. Medium
Type ⇒ Enhancement
Summary ⇒ turba/lib/api.php added 'modified' webservice like kronolith
Queue ⇒ Turba
Milestone ⇒ 3.4.4
Patch ⇒ Yes
State ⇒ New
Reply to this comment
Kronolit has a 'modified' method that returns the last_modified of one 
entry using only one call.



the following implements this feature in turba too.

--- turba/lib/api.php.ori       2009-05-14 13:13:33.000000000 +0200

+++ turba/lib/api.php   2009-05-14 14:55:10.000000000 +0200

@@ -55,10 +55,14 @@

  );



  $_services['getActionTimestamp'] = array(

      'args' => array('uid' => 'string', 'timestamp' => 'int'),

      'type' => 'int',

  );

-

+$_services['modified'] = array(

+    'args' => array('uid' => 'string'),

+    'type' => 'int',

+);

+

  $_services['import'] = array(

      'args' => array('content' => 'string', 'contentType' => 
'string', 'source' => 'string'),

      'type' => 'string',

@@ -827,6 +831,15 @@

      return 0;

  }



+function _turba_modified($uid)

+{

+   $modified = _turba_getActionTimestamp($uid, 'modify');

+   if (empty($modified)) {

+       $modified = _turba_getActionTimestamp($uid, 'add');

+   }

+   return $modified;

+}

+

  /**

   * Import a contact represented in the specified contentType.

   *


Saved Queries