diff --git a/app/controllers/shared/log_event.php b/app/controllers/shared/log_event.php index 0355e45d789bc69c19c9cb7c8161cbaa299addf4..3d8af7ee4cd83d36ffe3e7aa8fd04b2a57593857 100644 --- a/app/controllers/shared/log_event.php +++ b/app/controllers/shared/log_event.php @@ -122,12 +122,12 @@ class Shared_LogEventController extends MVVController $search_action .= " AND `log_actions`.`name` LIKE CONCAT('%_'," . DBManager::get()->quote($log_action) . ")"; } - $statement = DBManager::get()->prepare("SELECT *, `log_actions`.`name` + $statement = DBManager::get()->prepare("SELECT * FROM `log_events` LEFT JOIN `log_actions` ON `log_events`.`action_id` = `log_actions`.`action_id` WHERE `info` = ? " . $search_action . " - ORDER BY `log_events`.`mkdate` DESC"); + ORDER BY `log_events`.`event_id` DESC"); $statement->execute([$mvv_field]); $res = $statement->fetchOne(); if ($res) { diff --git a/lib/classes/EventLog.php b/lib/classes/EventLog.php index 7336415bd4c0ea402dc73783f99291bd1b018904..b20b99764b99b3cc0a49e7c316ca292b0b3ccb12 100644 --- a/lib/classes/EventLog.php +++ b/lib/classes/EventLog.php @@ -87,7 +87,7 @@ class EventLog $offset = (int) $offset; $filter = $this->sql_event_filter($action_id, $object_id, $parameters) ?: '1'; - $filter .= " ORDER BY mkdate DESC, event_id DESC LIMIT {$offset}, 50"; + $filter .= " ORDER BY event_id DESC LIMIT {$offset}, 50"; $log_events = LogEvent::findBySQL($filter, $parameters); $events = [];