From 7d49bf7f6e71f05c69a9aa948b1988358b8b44dd Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 18 May 2012 11:48:18 +0200 Subject: [PATCH] some changes in calendar repeat class --- apps/calendar/lib/repeat.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/apps/calendar/lib/repeat.php b/apps/calendar/lib/repeat.php index 9a43925e27..6ee2e42c59 100644 --- a/apps/calendar/lib/repeat.php +++ b/apps/calendar/lib/repeat.php @@ -12,12 +12,28 @@ class OC_Calendar_Repeat{ /* * @brief returns the cache of an event + * @param (int) $id - id of the event + * @return (array) */ - public static function get(); + public static function get($id){ + $stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?'); + $result = $stmt->execute(array($id)); + $return = array(); + while($row = $result->fetchRow()){ + $return[] = $row; + } + return $return; + } /* * @brief returns the cache of an event in a specific peroid + * @param (int) $id - id of the event + * @param (string) $from - start for period in UTC + * @param (string) $until - end for period in UTC + * @return (array) */ - public static function get_inperiod(); + public static function get_inperiod($id, $from, $until){ + + } /* * @brief returns the cache of all repeating events of a calendar */