Skip to content

Commit

Permalink
Fix for full calendar with dates in repeat group.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheesegrits committed Oct 24, 2017
1 parent 86b8276 commit ab57941
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -443,10 +443,10 @@ public function getEvents($listid = '')
}

$startElement = $formModel->getElement($data['startdate']);
$startField = $startElement->getFullName(false);
$startField = $startElement->getFullName(false, false);
$enddate = trim($data['enddate']) !== '' ? FabrikString::safeColName($data['enddate']) : "''";
$endElement = trim($data['enddate']) !== '' ? $formModel->getElement($data['enddate']) : $startElement;
$endField = $endElement->getFullName(false);
$endField = $endElement->getFullName(false, false);

$startLocal = $store_as_local = (bool) $startElement->getParams()->get('date_store_as_local', false);
$endLocal = $store_as_local = (bool) $endElement->getParams()->get('date_store_as_local', false);
Expand Down Expand Up @@ -486,8 +486,8 @@ public function getEvents($listid = '')
$this_where = FabrikString::ltrimiword($this_where, 'WHERE');
$query = $this_where === '' ? $listModel->buildQueryWhere(true, $query) : $query->where($this_where);

$query->where($endField . ' >= ' . $db->quote($calStart));
$query->where($startField . ' <= ' . $db->quote($calEnd));
$query->where(FabrikString::safeColName($endField) . ' >= ' . $db->quote($calStart));
$query->where(FabrikString::safeColName($startField) . ' <= ' . $db->quote($calEnd));

$db->setQuery($query);
$sql = (string) $query;
Expand Down

0 comments on commit ab57941

Please sign in to comment.