Fix typo in mod/events

- Add todo in Model\Event
This commit is contained in:
Hypolite Petovan 2018-03-17 16:43:15 -04:00
parent 72b552895e
commit 95792f6b79
2 changed files with 3 additions and 2 deletions

View File

@ -339,7 +339,7 @@ function events_content(App $a) {
// get events by id or by date // get events by id or by date
if ($event_params['event_id']) { if ($event_params['event_id']) {
$r = Event::getListById(local_user(), $event_params['event-id']); $r = Event::getListById(local_user(), $event_params['event_id']);
} else { } else {
$r = Event::getListByDate(local_user(), $event_params); $r = Event::getListByDate(local_user(), $event_params);
} }
@ -370,7 +370,7 @@ function events_content(App $a) {
} }
if (x($_GET, 'id')) { if (x($_GET, 'id')) {
$tpl = get_markup_template("event.tpl"); $tpl = get_markup_template("event.tpl");
} else { } else {
$tpl = get_markup_template("events_js.tpl"); $tpl = get_markup_template("events_js.tpl");
} }

View File

@ -504,6 +504,7 @@ class Event extends BaseObject
} }
// Query for the event by date. // 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`, $r = q("SELECT `event`.*, `item`.`id` AS `itemid`,`item`.`plink`,
`item`.`author-name`, `item`.`author-avatar`, `item`.`author-link` FROM `event` `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` LEFT JOIN `item` ON `item`.`event-id` = `event`.`id` AND `item`.`uid` = `event`.`uid`