[wip] code smell, psr-12, mvc, other, forgot by 1 year.

This commit is contained in:
2023-01-24 19:04:15 +02:00
parent 775a56c4c8
commit 2bb6bef614
13 changed files with 254 additions and 112 deletions
+2 -2
View File
@@ -54,13 +54,13 @@ class Moderation
public static function blockUser(int $target)
{
self::addEffectStatusToUserLog($target, "Блокировка");
Db::getInstance()->execute('UPDATE battles.users SET block = 1 WHERE id = ?', $target);
Db::getInstance()->execute('UPDATE users SET block = 1 WHERE id = ?', $target);
}
public static function unBlockUser(int $target)
{
self::addEffectStatusToUserLog($target, "Блокировка" . self::STATUS_OFF);
Db::getInstance()->execute('UPDATE battles.users SET block = 0 WHERE block = 1 AND id = ?', $target);
Db::getInstance()->execute('UPDATE users SET block = 0 WHERE block = 1 AND id = ?', $target);
}
public static function addToUserLog(int $target, string $message, int $senderId)