aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/calendar/lib/object.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index 770df8b63df..b0164690429 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -43,11 +43,13 @@ class OC_Calendar_Object{
public static function allInPeriod($id, $start, $end){
$stmt = OC_DB::prepare( 'SELECT * FROM *PREFIX*calendar_objects WHERE calendarid = ?'
.' AND ((startdate >= ? AND startdate <= ? AND repeating = 0)'
+ .' OR (enddate >= ? AND enddate <= ? AND repeating = 0)'
.' OR (startdate <= ? AND repeating = 1))' );
$start = self::getUTCforMDB($start);
$end = self::getUTCforMDB($end);
$result = $stmt->execute(array($id,
$start, $end,
+ $start, $end,
$end));
$calendarobjects = array();