]> source.dussan.org Git - nextcloud-server.git/commitdiff
some changes in calendar repeat class
authorGeorg Ehrke <dev@georgswebsite.de>
Fri, 18 May 2012 09:48:18 +0000 (11:48 +0200)
committerGeorg Ehrke <dev@georgswebsite.de>
Fri, 18 May 2012 09:48:18 +0000 (11:48 +0200)
apps/calendar/lib/repeat.php

index 9a43925e27ddb42ae6d22601c0c70de84a97bbc9..6ee2e42c5921ebe39777051dc3ed4015730348b7 100644 (file)
 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
         */