Skip to content

Commit

Permalink
fixed: calendar viz: popup in ff was showing invalid date, and db joi…
Browse files Browse the repository at this point in the history
…ns elements used as labels were showing raw values not label data
  • Loading branch information
pollen8 committed Dec 4, 2013
1 parent 63da972 commit 141d97f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions plugins/fabrik_visualization/calendar/models/calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,12 +443,7 @@ public function getEvents()
$enddate = trim($data['enddate']) !== '' ? FabrikString::safeColName($data['enddate']) : "''";
$label = trim($data['label']) !== '' ? FabrikString::safeColName($data['label']) : "''";
$customUrl = $data['customUrl'];
/**
* $$$ hugh @FIXME - $label has already been quoted, so quoting it again meant the array_key_exists
* check was never matching, as the name got double quoted.
* But ... the code that isn't running is broken, so for now ... If It Ain't Working, Don't Fix It :)
*/
$qlabel = $db->quoteName($label);
$qlabel = $label;

if (array_key_exists($qlabel, $els))
{
Expand Down Expand Up @@ -503,7 +498,7 @@ public function getEvents()
$date = JFactory::getDate($row->startdate);
$row->startdate = $date->format('Y-m-d H:i:s', true);
$date->setTimezone($tz);
$row->startdate_locale = $date->format('Y-m-d H:i:s', true);
$row->startdate_locale = $date->toISO8601(true);

}

Expand All @@ -514,7 +509,7 @@ public function getEvents()
$date = JFactory::getDate($row->enddate);
$row->enddate = $date->format('Y-m-d H:i:d');
$date->setTimezone($tz);
$row->enddate_locale = $date->format('Y-m-d H:i:d', true);
$row->enddate_locale = $date->toISO8601(true);
}
}
else
Expand Down

0 comments on commit 141d97f

Please sign in to comment.