Compare commits

...

3 Commits

Author SHA1 Message Date
n1rwana dfab5997c9
Merge ef24294fc6 into 73eeaa8b3c 2023-08-11 02:08:22 +03:00
n1rwana 73eeaa8b3c
Fix of error 500 with many sequential slashes in URL (#15) 2023-08-11 02:07:20 +03:00
n1rwana ef24294fc6
Update Log.php 2023-08-11 00:40:16 +03:00
2 changed files with 3 additions and 3 deletions

View File

@ -40,12 +40,12 @@ class Log extends DBEntity
function getType(): string
{
return ["добавил", "отредактировал", "удалил", "восстановил"][$this->getTypeRaw()];
return [tr("logs_added"), tr("logs_edited"), tr("logs_removed"), tr("logs_restored")][$this->getTypeRaw()];
}
function getTypeNom(): string
{
return ["Создание", "Редактирование", "Удаление", "Восстановление"][$this->getTypeRaw()];
return [tr("logs_adding"), tr("logs_editing"), tr("logs_removing"), tr("logs_restoring")][$this->getTypeRaw()];
}
function getObjectType(): string

View File

@ -278,7 +278,7 @@ class Router
function execute(string $url, ?string $parentModule = null): ?string
{
$this->scope = [];
$this->url = chandler_escape_url(parse_url($url, PHP_URL_PATH));
$this->url = chandler_escape_url((string) parse_url(preg_replace("%/+%", "/", $url), PHP_URL_PATH));
if(!is_null($parentModule)) {
$GLOBALS["parentModule"] = $parentModule;