From ec645615ce5e29469fda57d689bb6b5c3f7c0b65 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Tue, 23 Apr 2024 09:47:35 +0000 Subject: [PATCH] fixes #4062 Closes #4062 Merge request studip/studip!2908 --- app/controllers/shared/log_event.php | 4 ++-- lib/classes/EventLog.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/shared/log_event.php b/app/controllers/shared/log_event.php index 0355e45d789..3d8af7ee4cd 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 7336415bd4c..b20b99764b9 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 = []; -- GitLab