diff --git a/app/Controllers/Routing.php b/app/Controllers/Routing.php index 4005e0de12a6cc3121be2ec43d3bedfa8e1cbbe8..fe7d546c416edfb3eb04b577c0b497fb1d883181 100644 --- a/app/Controllers/Routing.php +++ b/app/Controllers/Routing.php @@ -740,7 +740,7 @@ class Routing case $r::NOT_FOUND: // ... 404 Not Found if ( - '1' != $user->g_read_board + 1 !== $user->g_read_board && $user->isGuest ) { $page = $this->c->Redirect->page('Login'); diff --git a/app/Core/Config.php b/app/Core/Config.php index df096b7f958bc5c5da50b0c085c60c81442602f0..1ae655c058715da936822a6f5ac6cf6634146e07 100644 --- a/app/Core/Config.php +++ b/app/Core/Config.php @@ -186,7 +186,7 @@ class Config } else { $result[] = $value; } - } elseif (null != $key) { + } elseif (null !== $key) { throw new ForkException('Config array cannot be parsed'); } @@ -267,7 +267,7 @@ class Config $value = null; $key = null; - } elseif (null != $key) { + } elseif (null !== $key) { throw new ForkException('Config array cannot be parsed'); } diff --git a/app/Core/Parser.php b/app/Core/Parser.php index 4d03316b3e2618e54574d3eeed39b51fb0559224..880d85e227ca822f5284c04886804ef712aa4ac4 100644 --- a/app/Core/Parser.php +++ b/app/Core/Parser.php @@ -59,8 +59,8 @@ class Parser extends Parserus } $this->setAttr('baseUrl', $this->c->BASE_URL); - $this->setAttr('showImg', '0' != $this->c->user->show_img); - $this->setAttr('showImgSign', '0' != $this->c->user->show_img_sig); + $this->setAttr('showImg', 1 === $this->c->user->show_img); + $this->setAttr('showImgSign', 1 === $this->c->user->show_img_sig); } /** diff --git a/app/Models/Pages/Post.php b/app/Models/Pages/Post.php index 1be4f7bfe9af88148af4b79226bc4d71bd96f98e..0d57830236f17bcf88604b91beaac7ababd82eec 100644 --- a/app/Models/Pages/Post.php +++ b/app/Models/Pages/Post.php @@ -291,7 +291,7 @@ class Post extends Page $this->user->num_posts = $this->user->num_posts + 1; if ( - 0 != $this->user->g_promote_next_group + $this->user->g_promote_next_group > 0 && $this->user->num_posts >= $this->user->g_promote_min_posts ) { $this->user->group_id = $this->user->g_promote_next_group; diff --git a/app/Models/Pages/PostValidatorTrait.php b/app/Models/Pages/PostValidatorTrait.php index 271aa0461ab211c443ae9500684fd87dd663944a..70d5714122529d35b913aa25b76be517aa538394 100644 --- a/app/Models/Pages/PostValidatorTrait.php +++ b/app/Models/Pages/PostValidatorTrait.php @@ -27,7 +27,7 @@ trait PostValidatorTrait // заголовок темы только заглавными буквами } elseif ( ! $executive - && 1 != $this->c->config->b_subject_all_caps + && 1 !== $this->c->config->b_subject_all_caps && \preg_match('%\p{Lu}%u', $subject) && ! \preg_match('%\p{Ll}%u', $subject) ) { @@ -62,7 +62,7 @@ trait PostValidatorTrait if ( true === $prepare && ! $executive - && 1 != $this->c->config->b_message_all_caps + && 1 !== $this->c->config->b_message_all_caps ) { $text = $this->c->Parser->getText(); diff --git a/app/Models/Pages/Profile/Edit.php b/app/Models/Pages/Profile/Edit.php index 5c8ac0c9da339c1ea000969675af47e08d3751a3..e228c003c071335e0740a1b132b016eaad106e42 100644 --- a/app/Models/Pages/Profile/Edit.php +++ b/app/Models/Pages/Profile/Edit.php @@ -194,7 +194,7 @@ class Edit extends Profile if ( true === $prepare && ! $this->user->isAdmin - && 1 != $this->c->config->b_sig_all_caps + && 1 !== $this->c->config->b_sig_all_caps ) { $text = $this->c->Parser->getText(); diff --git a/app/Models/Subscription/Subscription.php b/app/Models/Subscription/Subscription.php index 14b63296f06cf53c8b934ec1f28cfaf54d31d42a..014f6a938461f845011e95aaa652c5b3e4a91cc4 100644 --- a/app/Models/Subscription/Subscription.php +++ b/app/Models/Subscription/Subscription.php @@ -217,7 +217,7 @@ class Subscription extends Model if (self::FORUMS_DATA & $type) { if ( - 1 != $this->c->config->b_forum_subscriptions + 1 !== $this->c->config->b_forum_subscriptions || $model->isGuest ) { $result[self::FORUMS_DATA] = null; @@ -232,7 +232,7 @@ class Subscription extends Model if (self::TOPICS_DATA & $type) { if ( - 1 != $this->c->config->b_topic_subscriptions + 1 !== $this->c->config->b_topic_subscriptions || $model->isGuest ) { $result[self::TOPICS_DATA] = null; diff --git a/app/Models/User/ChangeGroup.php b/app/Models/User/ChangeGroup.php index 78ea56023fd14468e5cdf59ef6f4a92afb0ba9f9..a9a95e1763ce00dabd5888c7f0ff75584645f1eb 100644 --- a/app/Models/User/ChangeGroup.php +++ b/app/Models/User/ChangeGroup.php @@ -41,7 +41,7 @@ class ChangeGroup extends Action } if ( - 1 != $newGroup->g_moderator + 1 !== $newGroup->g_moderator && $user->isAdmMod ) { $moderators[$user->id] = $user; diff --git a/app/Models/Validators/NoURL.php b/app/Models/Validators/NoURL.php index 02f972549da0effdbe6def23cfc7c58462dfe827..16e82aa2a3b31904062bcf1d25625962c726f027 100644 --- a/app/Models/Validators/NoURL.php +++ b/app/Models/Validators/NoURL.php @@ -29,7 +29,7 @@ class NoURL extends RulesValidator if ( ( ! empty($flag) - || '1' != $this->c->user->g_post_links + || 1 !== $this->c->user->g_post_links ) && \preg_match('%https?://|www\.%i', $value) ) {