From 24813c63d8759acf39e2f4789512f595c699c3df Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 16 Jun 2009 14:50:23 +0200 Subject: [PATCH] Propagate the 'modified' API method (Request #8274). --- kronolith/docs/CHANGES | 1 + kronolith/lib/api.php | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/kronolith/docs/CHANGES b/kronolith/docs/CHANGES index 550855dda..b04fc3716 100644 --- a/kronolith/docs/CHANGES +++ b/kronolith/docs/CHANGES @@ -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 diff --git a/kronolith/lib/api.php b/kronolith/lib/api.php index 581676a4f..14a4b9795 100644 --- a/kronolith/lib/api.php +++ b/kronolith/lib/api.php @@ -10,6 +10,11 @@ * @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; } -- 2.11.0