From cf499d51e9d1c74e1ab122cbd130dc16e0fd58ab Mon Sep 17 00:00:00 2001 From: n1rwana Date: Thu, 10 Aug 2023 00:26:58 +0300 Subject: [PATCH] Update Log.php --- chandler/Database/Log.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/chandler/Database/Log.php b/chandler/Database/Log.php index 3c6b127..f2b1b99 100644 --- a/chandler/Database/Log.php +++ b/chandler/Database/Log.php @@ -50,16 +50,12 @@ class Log extends DBEntity function getObjectType(): string { - return [ - "albums" => "Альбом", - "groups" => "Сообщество", - "profiles" => "Профиль", - "comments" => "Комментарий", - "ip" => "IP-адрес", - "posts" => "Запись", - "tickets" => "Вопрос", - "tickets_comments" => "Комментарий к тикету", - ][$this->getRecord()->object_table] ?? $this->getRecord()->object_model; + $type = tr("log_" . $this->getObjectTable()); + if ($type === "@log_" . $this->getObjectTable()) { + return str_replace(CHANDLER_ROOT_CONF["preferences"]["logs"]["entitiesNamespace"], "", $this->getRecord()->object_model); + } else { + return $type; + } } function getObjectName(): string