diff options
Diffstat (limited to 'apps/calendar/lib/repeat.php')
-rw-r--r-- | apps/calendar/lib/repeat.php | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/apps/calendar/lib/repeat.php b/apps/calendar/lib/repeat.php index b9fbee8fe0a..27f1e0481a1 100644 --- a/apps/calendar/lib/repeat.php +++ b/apps/calendar/lib/repeat.php @@ -16,7 +16,7 @@ class OC_Calendar_Repeat{ * @return (array) */ public static function get($id){ - $stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?'); + $stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?'); $result = $stmt->execute(array($id)); $return = array(); while($row = $result->fetchRow()){ @@ -32,9 +32,9 @@ class OC_Calendar_Repeat{ * @return (array) */ public static function get_inperiod($id, $from, $until){ - $stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_repeat WHERE eventid = ?' - .' AND ((startdate >= ? AND startdate <= ?)' - .' OR (enddate >= ? AND enddate <= ?))'); + $stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?' + .' AND ((`startdate` >= ? AND `startdate` <= ?)' + .' OR (`enddate` >= ? AND `enddate` <= ?))'); $result = $stmt->execute(array($id, OC_Calendar_Object::getUTCforMDB($from), OC_Calendar_Object::getUTCforMDB($until), OC_Calendar_Object::getUTCforMDB($from), OC_Calendar_Object::getUTCforMDB($until))); @@ -50,7 +50,7 @@ class OC_Calendar_Repeat{ * @return (array) */ public static function getCalendar($id){ - $stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?'); + $stmt = OCP\DB::prepare('SELECT * FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?'); $result = $stmt->execute(array($id)); $return = array(); while($row = $result->fetchRow()){ @@ -66,9 +66,9 @@ class OC_Calendar_Repeat{ * @return (array) */ public static function getCalendar_inperiod($id, $from, $until){ - $stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?' - .' AND ((startdate >= ? AND startdate <= ?)' - .' OR (enddate >= ? AND enddate <= ?))'); + $stmt = OCP\DB::prepare( 'SELECT * FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?' + .' AND ((`startdate` >= ? AND `startdate` <= ?)' + .' OR (`enddate` >= ? AND `enddate` <= ?))'); $result = $stmt->execute(array($id, $from, $until, $from, $until)); @@ -99,7 +99,7 @@ class OC_Calendar_Repeat{ continue; } $startenddate = OC_Calendar_Object::generateStartEndDate($vevent->DTSTART, OC_Calendar_Object::getDTEndFromVEvent($vevent), ($vevent->DTSTART->getDateType() == Sabre_VObject_Element_DateTime::DATE)?true:false, 'UTC'); - $stmt = OCP\DB::prepare('INSERT INTO *PREFIX*calendar_repeat (eventid,calid,startdate,enddate) VALUES(?,?,?,?)'); + $stmt = OCP\DB::prepare('INSERT INTO `*PREFIX*calendar_repeat` (`eventid`,`calid`,`startdate`,`enddate`) VALUES(?,?,?,?)'); $stmt->execute(array($id,OC_Calendar_Object::getCalendarid($id),$startenddate['start'],$startenddate['end'])); } return true; @@ -189,7 +189,7 @@ class OC_Calendar_Repeat{ * @return (bool) */ public static function clean($id){ - $stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_repeat WHERE eventid = ?'); + $stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_repeat` WHERE `eventid` = ?'); $stmt->execute(array($id)); } /** @@ -198,7 +198,7 @@ class OC_Calendar_Repeat{ * @return (bool) */ public static function cleanCalendar($id){ - $stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_repeat WHERE calid = ?'); + $stmt = OCP\DB::prepare('DELETE FROM `*PREFIX*calendar_repeat` WHERE `calid` = ?'); $stmt->execute(array($id)); } }
\ No newline at end of file |