This commit is contained in:
n1rwana 2022-09-05 22:30:01 +03:00
parent 1dc57f766e
commit b1848c3afa
3 changed files with 7 additions and 3 deletions

View file

@ -26,7 +26,7 @@ final class BlacklistPresenter extends OpenVKPresenter
$record->setCreated(time());
$record->save();
$this->flashFail("succ", "Успех", $target->getCanonicalName() . " занесён в чёрный список.");
$this->flashFail("succ", tr("success"), tr("user_blacklisted", $target->getCanonicalName()));
}
function renderRemoveFromBlacklist(): void
@ -35,10 +35,9 @@ final class BlacklistPresenter extends OpenVKPresenter
$this->assertUserLoggedIn();
$record = $this->blacklists->getByAuthorAndTarget($this->user->identity->getId(), $this->postParam("id"));
//$record = new BlacklistItem(DB::i()->getContext()->table("blacklists")->where([ "author" => $this->user->identity->getId(), "target" => ])->fetch());
$name = $record->getTarget()->getCanonicalName();
$record->delete(false);
$this->flashFail("succ", "Успех", "$name удалён из чёрного списка.");
$this->flashFail("succ", tr("success"), tr("user_removed_from_the_blacklist", $name));
}
}

View file

@ -1145,6 +1145,8 @@
"blacklist" = "Blacklist";
"user_blacklisted_you" = "This user has blacklisted you.";
"user_blacklisted" = "$1 has been blacklisted"
"user_removed_from_the_blacklist" = "$1 has been removed from the blacklist."
/* Away */

View file

@ -1187,6 +1187,7 @@
"edit_action" = "Изменить";
"transfer" = "Передать";
"close" = "Закрыть";
"success" = "Успех";
"warning" = "Внимание";
"question_confirm" = "Это действие нельзя отменить. Вы действительно уверены в том что хотите сделать?";
@ -1204,6 +1205,8 @@
"blacklist" = "Чёрный список";
"user_blacklisted_you" = "Пользователь внёс Вас в чёрный список.";
"user_blacklisted" = "$1 занесён в чёрный список."
"user_removed_from_the_blacklist" = "$1 удалён из чёрного списка."
/* Away */