- Add todo in Model\Event
// get events by id or by date
if ($event_params['event_id']) {
- $r = Event::getListById(local_user(), $event_params['event-id']);
+ $r = Event::getListById(local_user(), $event_params['event_id']);
} else {
$r = Event::getListByDate(local_user(), $event_params);
}
}
if (x($_GET, 'id')) {
- $tpl = get_markup_template("event.tpl");
+ $tpl = get_markup_template("event.tpl");
} else {
$tpl = get_markup_template("events_js.tpl");
}
}
// Query for the event by date.
+ // @todo Slow query (518 seconds to run), to be optimzed
$r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink`,
`item`.`author-name`, `item`.`author-avatar`, `item`.`author-link` FROM `event`
LEFT JOIN `item` ON `item`.`event-id` = `event`.`id` AND `item`.`uid` = `event`.`uid`