Skip to content

Commit

Permalink
DEV: Незначительные изменения
Browse files Browse the repository at this point in the history
  • Loading branch information
evgip committed Oct 1, 2022
1 parent d32b9b1 commit a18f931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions app/Services/Audit.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ public function index()
public function prohibitedContent(string $content)
{

if (!self::stopUrl($content, $this->user['id'])) {
if (!self::stopUrl($content, (int)$this->user['id'])) {
return false;
}

if (!self::stopWords($content, $this->user['id'])) {
if (!self::stopWords($content, (int)$this->user['id'])) {
return false;
}

Expand All @@ -83,12 +83,12 @@ public function prohibitedContent(string $content)

// If there is a link and the total contribution (adding posts, replies and comments) is less than N
// Если есть ссылка и общий вклад (добавления постов, ответов и комментариев) меньше N
public static function stopUrl(string $content, int $uid)
public static function stopUrl(string $content, int $user_id)
{
if (self::estimationUrl($content)) {
$all_count = ActionModel::allContentUserCount($uid);
$all_count = ActionModel::allContentUserCount($user_id);
if ($all_count < 2) {
ActionModel::addLimitingMode($uid);
ActionModel::addLimitingMode($user_id);
Msg::add(__('msg.content_audit'), 'error');
return false;
}
Expand All @@ -98,12 +98,12 @@ public static function stopUrl(string $content, int $uid)

// If the word is on the stop list and the total contribution is minimal (less than 2)
// Если слово в стоп листе и общий вклад минимальный (меньше 2)
public static function stopWords(string $content, int $uid)
public static function stopWords(string $content, int $user_id)
{
if (self::stopWordsExists($content)) {
$all_count = ActionModel::allContentUserCount($uid);
$all_count = ActionModel::allContentUserCount($user_id);
if ($all_count < 2) {
ActionModel::addLimitingMode($uid);
ActionModel::addLimitingMode($user_id);
Msg::add(__('msg.content_audit'), 'error');
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/default/_block/admin-dropdown-post.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if (UserData::checkAdmin()) : ?>
<div class="relative">
<div class="relative ml10">
<span class="trigger gray-600 text-sm">
<svg class="icons">
<use xlink:href="/assets/svg/icons.svg#more-horizontal"></use>
Expand Down

0 comments on commit a18f931

Please sign in to comment.