Propagate the 'modified' API method (Request #8274).
authorJan Schneider <jan@horde.org>
Tue, 16 Jun 2009 12:50:23 +0000 (14:50 +0200)
committerJan Schneider <jan@horde.org>
Tue, 16 Jun 2009 12:50:45 +0000 (14:50 +0200)
kronolith/docs/CHANGES
kronolith/lib/api.php

index 550855d..b04fc37 100644 (file)
@@ -23,6 +23,7 @@ v3.0-git
 v2.3.2-cvs
 ----------
 
+[jan] Propagate the 'modified' API method (Request #8274).
 [cjh] Fix the signature of the kronolith/import API method
       (rpolli@babel.it, Bug #8309).
 [jan] Correctly create all-day events if using the all-day link in the day
index 581676a..14a4b97 100644 (file)
  * @package Kronolith
  */
 
+$_services['show'] = array(
+    'link' => '%application%/event.php?calendar=|calendar|' .
+              '&eventID=|event|&uid=|uid|'
+);
+
 $_services['perms'] = array(
     'args' => array(),
     'type' => '{urn:horde}stringArray'
@@ -24,9 +29,9 @@ $_services['shareHelp'] = array(
     'args' => array(),
     'type' => 'string');
 
-$_services['show'] = array(
-    'link' => '%application%/event.php?calendar=|calendar|' .
-              '&eventID=|event|&uid=|uid|'
+$_services['modified'] = array(
+    'args' => array('uid' => 'string'),
+    'type' => 'int',
 );
 
 $_services['browse'] = array(
@@ -242,7 +247,7 @@ function _kronolith_shareHelp()
  *
  * @return integer  The timestamp for the last modification of $uid.
  */
-function __kronolith_modified($uid)
+function _kronolith_modified($uid)
 {
     $modified = _kronolith_getActionTimestamp($uid, 'modify');
     if (empty($modified)) {
@@ -421,7 +426,7 @@ function _kronolith_browse($path = '', $properties = array())
                     $results[$key]['contentlength'] = 1;
                 }
                 if (in_array('modified', $properties)) {
-                    $results[$key]['modified'] = __kronolith_modified($event->getUID());
+                    $results[$key]['modified'] = _kronolith_modified($event->getUID());
                 }
                 if (in_array('created', $properties)) {
                     $results[$key]['created'] = _kronolith_getActionTimestamp($event->getUID(), 'add');
@@ -448,7 +453,7 @@ function _kronolith_browse($path = '', $properties = array())
             $result = array(
                 'data' => _kronolith_export($event->getUID(), 'text/calendar'),
                 'mimetype' => 'text/calendar');
-            $modified = __kronolith_modified($event->getUID());
+            $modified = _kronolith_modified($event->getUID());
             if (!empty($modified)) {
                 $result['mtime'] = $modified;
             }