From c4865bb067557c5b20c0086b412713e92f974c70 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 28 Sep 2011 12:37:06 +0000 Subject: [PATCH] * CalDAV/GroupDAV/InfoLog: making synced InfoLog types configurable and moved getctag method to infolog_bo in preparation of InfoLog eSync support --- infolog/inc/class.infolog_bo.inc.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/infolog/inc/class.infolog_bo.inc.php b/infolog/inc/class.infolog_bo.inc.php index 10ad1618f1..199e1cfc6f 100644 --- a/infolog/inc/class.infolog_bo.inc.php +++ b/infolog/inc/class.infolog_bo.inc.php @@ -1052,6 +1052,32 @@ class infolog_bo return $ret; } + /** + * Query ctag for infolog + * + * @param string $filter='own' + * @param string|array $types='task' + * @return string + */ + public function getctag(array $filter) + { + $filter += array( + 'order' => 'info_datemodified', + 'sort' => 'DESC', + 'date_format' => 'server', + 'start' => 0, + 'num_rows' => 1, + ); + + $result =& $this->search($filter); + + if (empty($result)) return 'EGw-empty-wGE'; + + $entry = array_shift($result); + + return 'EGw-'.$entry['info_datemodified'].'-wGE'; + } + /** * imports a mail identified by uid as infolog *