Update Log.php

This commit is contained in:
n1rwana 2023-08-10 00:26:58 +03:00
parent 8985dec499
commit cf499d51e9
No known key found for this signature in database
GPG key ID: 184A60085ABF17D8

View file

@ -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