[Tickets #8275] turba/lib/api.php added 'modified' webservice like kronolith

bugs at horde.org bugs at horde.org
Thu May 14 12:59:48 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8275
------------------------------------------------------------------------------
  Ticket             | 8275
  Created By         | rpolli at babel.it
  Summary            | turba/lib/api.php added 'modified' webservice like
                     | kronolith
  Queue              | Turba
  Version            | 2.3.1
  Type               | Enhancement
  State              | New
  Priority           | 2. Medium
  Milestone          | 3.4.4
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


rpolli at babel.it (2009-05-14 08:59) wrote:

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.
   *







More information about the bugs mailing list