Sfoglia il codice sorgente

Revert "Small changes that break everything"

This reverts commit e61bd6c3c044ac02096fbbebf7a1e83a63eeca3a.
Visman 3 anni fa
parent
commit
efaf3112d8
39 ha cambiato i file con 79 aggiunte e 93 eliminazioni
  1. 1 1
      app/Core/Cache/FileCache.php
  2. 1 1
      app/Core/Container.php
  3. 4 4
      app/Core/DB/Mysql.php
  4. 1 1
      app/Core/DB/Sqlite.php
  5. 4 4
      app/Core/Lang.php
  6. 1 1
      app/Core/Router.php
  7. 1 1
      app/Models/BanList/BanList.php
  8. 1 1
      app/Models/BanList/Filter.php
  9. 3 3
      app/Models/BanList/Insert.php
  10. 3 3
      app/Models/BanList/Update.php
  11. 1 1
      app/Models/Config/Load.php
  12. 1 1
      app/Models/Online/Online.php
  13. 2 10
      app/Models/Page.php
  14. 7 8
      app/Models/Pages/Admin/Bans.php
  15. 1 1
      app/Models/Pages/Admin/Groups.php
  16. 2 5
      app/Models/Pages/Admin/Parser/Smilies.php
  17. 1 2
      app/Models/Pages/Admin/Users/Result.php
  18. 1 1
      app/Models/Pages/Admin/Users/Stat.php
  19. 1 1
      app/Models/Pages/Post.php
  20. 2 2
      app/Models/Pages/PostValidatorTrait.php
  21. 3 3
      app/Models/Pages/Profile.php
  22. 2 2
      app/Models/Pages/Profile/Edit.php
  23. 3 3
      app/Models/Pages/Profile/View.php
  24. 2 2
      app/Models/Pages/Register.php
  25. 2 2
      app/Models/Pages/Search.php
  26. 1 2
      app/Models/Poll/Poll.php
  27. 8 8
      app/Models/Post/Post.php
  28. 1 1
      app/Models/Search/Execute.php
  29. 2 2
      app/Models/SmileyList/Insert.php
  30. 2 2
      app/Models/SmileyList/Update.php
  31. 1 1
      app/Models/User/Current.php
  32. 1 1
      app/Models/User/Filter.php
  33. 2 2
      app/Models/User/Promote.php
  34. 3 3
      app/Models/User/User.php
  35. 2 2
      app/functions.php
  36. 1 1
      app/templates/layouts/main.forkbb.php
  37. 2 2
      app/templates/layouts/subforums.forkbb.php
  38. 1 1
      app/templates/pm/topic.forkbb.php
  39. 1 1
      app/templates/topic.forkbb.php

+ 1 - 1
app/Core/Cache/FileCache.php

@@ -213,7 +213,7 @@ class FileCache implements CacheInterface
         if (! \preg_match('%^[a-z0-9_\.]+$%Di', $key)) {
         if (! \preg_match('%^[a-z0-9_\.]+$%Di', $key)) {
             throw new InvalidArgumentException('Key is not a legal value');
             throw new InvalidArgumentException('Key is not a legal value');
         }
         }
-        if ('poll' === \substr($key, 0, 4)) {
+        if ('poll' == \substr($key, 0, 4)) {
             return $this->cacheDir . "/polls/{$key}.php";
             return $this->cacheDir . "/polls/{$key}.php";
         } else {
         } else {
             return $this->cacheDir . "/cache_{$key}.php";
             return $this->cacheDir . "/cache_{$key}.php";

+ 1 - 1
app/Core/Container.php

@@ -175,7 +175,7 @@ class Container
                     $value = \preg_replace_callback(
                     $value = \preg_replace_callback(
                         '~\\\%|%([a-z0-9_]+(?:\.[a-z0-9_]+)*)%~i',
                         '~\\\%|%([a-z0-9_]+(?:\.[a-z0-9_]+)*)%~i',
                         function ($matches) {
                         function ($matches) {
-                            return '\\%' === $matches[0] ? '%' : $this->__get($matches[1]);
+                            return '\\%' == $matches[0] ? '%' : $this->__get($matches[1]);
                         },
                         },
                         $value
                         $value
                     );
                     );

+ 4 - 4
app/Core/DB/Mysql.php

@@ -226,7 +226,7 @@ class Mysql
         $table = $this->tName($table);
         $table = $this->tName($table);
         $vars  = [
         $vars  = [
             ':tname' => $table,
             ':tname' => $table,
-            ':index' => 'PRIMARY' === $index ? $index : $table . '_' . $index,
+            ':index' => 'PRIMARY' == $index ? $index : $table . '_' . $index,
         ];
         ];
         $query = 'SELECT 1
         $query = 'SELECT 1
             FROM INFORMATION_SCHEMA.STATISTICS
             FROM INFORMATION_SCHEMA.STATISTICS
@@ -418,7 +418,7 @@ class Mysql
         $stmt->closeCursor();
         $stmt->closeCursor();
 
 
         $type      = $result['COLUMN_TYPE'];
         $type      = $result['COLUMN_TYPE'];
-        $allowNull = 'YES' === $result['IS_NULLABLE'];
+        $allowNull = 'YES' == $result['IS_NULLABLE'];
         $default   = $result['COLUMN_DEFAULT'];
         $default   = $result['COLUMN_DEFAULT'];
         $collate   = \str_replace('utf8mb4_', '', $result['COLLATION_NAME'], $count);
         $collate   = \str_replace('utf8mb4_', '', $result['COLLATION_NAME'], $count);
 
 
@@ -444,7 +444,7 @@ class Mysql
 
 
         $query = "ALTER TABLE `{$table}` ADD ";
         $query = "ALTER TABLE `{$table}` ADD ";
 
 
-        if ('PRIMARY' === $index) {
+        if ('PRIMARY' == $index) {
             $query .= 'PRIMARY KEY';
             $query .= 'PRIMARY KEY';
         } else {
         } else {
             $this->nameCheck($index);
             $this->nameCheck($index);
@@ -471,7 +471,7 @@ class Mysql
 
 
         $query = "ALTER TABLE `{$table}` DROP ";
         $query = "ALTER TABLE `{$table}` DROP ";
 
 
-        if ('PRIMARY' === $index) {
+        if ('PRIMARY' == $index) {
             $query .= "PRIMARY KEY";
             $query .= "PRIMARY KEY";
         } else {
         } else {
             $this->nameCheck($index);
             $this->nameCheck($index);

+ 1 - 1
app/Core/DB/Sqlite.php

@@ -308,7 +308,7 @@ class Sqlite
 
 
                     break;
                     break;
             }
             }
-        } while ('' !== \trim($subSchema));
+        } while ('' != \trim($subSchema));
 
 
         return $result;
         return $result;
     }
     }

+ 4 - 4
app/Core/Lang.php

@@ -261,11 +261,11 @@ class Lang
                 continue;
                 continue;
 
 
             // комментарий
             // комментарий
-            } elseif ('#' === $line[0]) {
+            } elseif ('#' == $line[0]) {
                 continue;
                 continue;
 
 
             // многострочное содержимое
             // многострочное содержимое
-            } elseif ('"' === $line[0]) {
+            } elseif ('"' == $line[0]) {
                 if (isset($curComm)) {
                 if (isset($curComm)) {
                     $curVal .= $this->originalLine($line);
                     $curVal .= $this->originalLine($line);
                 }
                 }
@@ -336,8 +336,8 @@ class Lang
     {
     {
         if (
         if (
             isset($line[1])
             isset($line[1])
-            && '"' === $line[0]
-            && '"' === $line[-1]
+            && '"' == $line[0]
+            && '"' == $line[-1]
         ) {
         ) {
             $line = \substr($line, 1, -1);
             $line = \substr($line, 1, -1);
         }
         }

+ 1 - 1
app/Core/Router.php

@@ -197,7 +197,7 @@ class Router
      */
      */
     public function route(string $method, string $uri): array
     public function route(string $method, string $uri): array
     {
     {
-        $head = 'HEAD' === $method;
+        $head = 'HEAD' == $method;
 
 
         if (
         if (
             empty($this->methods[$method])
             empty($this->methods[$method])

+ 1 - 1
app/Models/BanList/BanList.php

@@ -54,7 +54,7 @@ class BanList extends Model
     {
     {
         $val = \trim($val ?? '');
         $val = \trim($val ?? '');
 
 
-        if ('' === $val) {
+        if ('' == $val) {
             return null;
             return null;
         } elseif ($toLower) {
         } elseif ($toLower) {
             return \mb_strtolower($val, 'UTF-8');
             return \mb_strtolower($val, 'UTF-8');

+ 1 - 1
app/Models/BanList/Filter.php

@@ -57,7 +57,7 @@ class Filter extends Method
                         || 'ILIKE' === $like
                         || 'ILIKE' === $like
                     ) {
                     ) {
                         // кроме * есть другие символы
                         // кроме * есть другие символы
-                        if ('' !== \trim($rule[1], '*')) {
+                        if ('' != \trim($rule[1], '*')) {
                             $where[] = "b.{$field} {$like} ?{$fields[$field]} ESCAPE '#'";
                             $where[] = "b.{$field} {$like} ?{$fields[$field]} ESCAPE '#'";
                             $vars[]  = \str_replace(['#', '%', '_', '*'], ['##', '#%', '#_', '%'], $rule[1]);
                             $vars[]  = \str_replace(['#', '%', '_', '*'], ['##', '#%', '#_', '%'], $rule[1]);
                         }
                         }

+ 3 - 3
app/Models/BanList/Insert.php

@@ -29,9 +29,9 @@ class Insert extends Method
         }
         }
 
 
         if (
         if (
-            '' === $ban['username']
-            && '' === $ban['ip']
-            && '' === $ban['email']
+            '' == $ban['username']
+            && '' == $ban['ip']
+            && '' == $ban['email']
         ) {
         ) {
             throw new InvalidArgumentException('Empty ban');
             throw new InvalidArgumentException('Empty ban');
         }
         }

+ 3 - 3
app/Models/BanList/Update.php

@@ -30,9 +30,9 @@ class Update extends Method
         }
         }
 
 
         if (
         if (
-            '' === $ban['username']
-            && '' === $ban['ip']
-            && '' === $ban['email']
+            '' == $ban['username']
+            && '' == $ban['ip']
+            && '' == $ban['email']
         ) {
         ) {
             throw new InvalidArgumentException('Empty ban');
             throw new InvalidArgumentException('Empty ban');
         }
         }

+ 1 - 1
app/Models/Config/Load.php

@@ -33,7 +33,7 @@ class Load extends Method
                     $value = \json_decode($row['conf_value'], true, 512, \JSON_THROW_ON_ERROR);
                     $value = \json_decode($row['conf_value'], true, 512, \JSON_THROW_ON_ERROR);
                     break;
                     break;
                 case 'b':
                 case 'b':
-                    $value = '1' === $row['conf_value'] ? 1 : 0;
+                    $value = '1' == $row['conf_value'] ? 1 : 0;
                     break;
                     break;
                 case 'i':
                 case 'i':
                     if (null !== $row['conf_value']) {
                     if (null !== $row['conf_value']) {

+ 1 - 1
app/Models/Online/Online.php

@@ -127,7 +127,7 @@ class Online extends Model
             if ($cur['user_id'] > 0) {
             if ($cur['user_id'] > 0) {
                 $users[$cur['user_id']] = $cur['ident'];
                 $users[$cur['user_id']] = $cur['ident'];
             // гость
             // гость
-            } elseif ('' === $cur['o_name']) {
+            } elseif ('' == $cur['o_name']) {
                 $guests[] = $cur['ident'];
                 $guests[] = $cur['ident'];
             // бот
             // бот
             } else {
             } else {

+ 2 - 10
app/Models/Page.php

@@ -249,23 +249,15 @@ abstract class Page extends Model
 
 
         if (
         if (
             1 === $this->user->g_read_board
             1 === $this->user->g_read_board
-            && '' !== $this->c->config->o_additional_navlinks
+            && '' != $this->c->config->o_additional_navlinks
         ) {
         ) {
             // position|name|link[|id]\n
             // position|name|link[|id]\n
-            if (
-                \preg_match_all(
-                    '%^(\d+)\|([^\|\n\r]+)\|([^\|\n\r]+)(?:\|([^\|\n\r]+))?%m',
-                    $this->c->config->o_additional_navlinks . "\n",
-                    $matches
-                )
-            ) {
+            if (\preg_match_all('%^(\d+)\|([^\|\n\r]+)\|([^\|\n\r]+)(?:\|([^\|\n\r]+))?%m', $this->c->config->o_additional_navlinks . "\n", $matches)) {
                $k = \count($matches[0]);
                $k = \count($matches[0]);
-
                for ($i = 0; $i < $k; ++$i) {
                for ($i = 0; $i < $k; ++$i) {
                    if (empty($matches[4][$i])) {
                    if (empty($matches[4][$i])) {
                        $matches[4][$i] = 'extra' . $i;
                        $matches[4][$i] = 'extra' . $i;
                    }
                    }
-
                    if (isset($navGen[$matches[4][$i]])) {
                    if (isset($navGen[$matches[4][$i]])) {
                        $navGen[$matches[4][$i]] = [$matches[3][$i], $matches[2][$i], $matches[2][$i]];
                        $navGen[$matches[4][$i]] = [$matches[3][$i], $matches[2][$i], $matches[2][$i]];
                    } else {
                    } else {

+ 7 - 8
app/Models/Pages/Admin/Bans.php

@@ -313,8 +313,7 @@ class Bans extends Admin
 
 
         foreach ($data as $field => $value) {
         foreach ($data as $field => $value) {
             if (
             if (
-                null === $value
-                || '' === $value
+                '' == $value
                 || 'order_by' === $field
                 || 'order_by' === $field
                 || 'direction' === $field
                 || 'direction' === $field
             ) {
             ) {
@@ -361,10 +360,10 @@ class Bans extends Admin
             return $this->c->Message->message('Bad request');
             return $this->c->Message->message('Bad request');
         }
         }
 
 
-        $idsN   = $this->forFilter($data);
-        $number = \count($idsN);
+        $idsN = $this->forFilter($data);
 
 
-        if (! $number) {
+        $number = \count($idsN);
+        if (0 == $number) {
             $this->fIswev = ['i', 'No bans found'];
             $this->fIswev = ['i', 'No bans found'];
 
 
             return $this->view([], 'GET', $data);
             return $this->view([], 'GET', $data);
@@ -845,9 +844,9 @@ class Bans extends Admin
     {
     {
         if (
         if (
             $this->banCount < 1
             $this->banCount < 1
-            && '' === $v->username
-            && '' === $v->ip
-            && '' === $v->email
+            && '' == $v->username
+            && '' == $v->ip
+            && '' == $v->email
         ) {
         ) {
             $v->addError('Must enter message');
             $v->addError('Must enter message');
         }
         }

+ 1 - 1
app/Models/Pages/Admin/Groups.php

@@ -332,7 +332,7 @@ class Groups extends Admin
         }
         }
         if (
         if (
             isset($data['g_promote_next_group'])
             isset($data['g_promote_next_group'])
-            && 0 === $data['g_promote_next_group'] * $data['g_promote_min_posts']
+            && 0 == $data['g_promote_next_group'] * $data['g_promote_min_posts']
         ) {
         ) {
             $data['g_promote_next_group'] = 0;
             $data['g_promote_next_group'] = 0;
             $data['g_promote_min_posts']  = 0;
             $data['g_promote_min_posts']  = 0;

+ 2 - 5
app/Models/Pages/Admin/Parser/Smilies.php

@@ -96,15 +96,12 @@ class Smilies extends Parser
                 $new = $v->smilies;
                 $new = $v->smilies;
 
 
                 foreach ($new as $id => $cur) {
                 foreach ($new as $id => $cur) {
-                    if (
-                        isset($old[$id])
-                        && $cur !== $old[$id]
-                    ) {
+                    if (isset($old[$id]) && $cur != $old[$id]) {
                         $this->c->smilies->update($id, $cur);
                         $this->c->smilies->update($id, $cur);
                     }
                     }
                 }
                 }
 
 
-                if ($v->new_sm_code) {
+                if ('' != $v->new_sm_code) {
                     $this->c->smilies->insert([
                     $this->c->smilies->insert([
                         'sm_code'     => $v->new_sm_code,
                         'sm_code'     => $v->new_sm_code,
                         'sm_position' => $v->new_sm_position,
                         'sm_position' => $v->new_sm_position,

+ 1 - 2
app/Models/Pages/Admin/Users/Result.php

@@ -42,8 +42,7 @@ class Result extends Users
         }
         }
 
 
         $number = \count($idsN);
         $number = \count($idsN);
-
-        if (! $number) {
+        if (0 == $number) {
             $view = $this->c->AdminUsers;
             $view = $this->c->AdminUsers;
             $view->fIswev = ['i', 'No users found'];
             $view->fIswev = ['i', 'No users found'];
 
 

+ 1 - 1
app/Models/Pages/Admin/Users/Stat.php

@@ -39,7 +39,7 @@ class Stat extends Users
 
 
         $user = $this->c->users->load($args['id']);
         $user = $this->c->users->load($args['id']);
 
 
-        if (! $number) {
+        if (0 == $number) {
             $this->fIswev = ['i', 'Results no posts found'];
             $this->fIswev = ['i', 'Results no posts found'];
         }
         }
 
 

+ 1 - 1
app/Models/Pages/Post.php

@@ -287,7 +287,7 @@ class Post extends Page
             ! $merge
             ! $merge
             && ! $this->user->isGuest
             && ! $this->user->isGuest
         ) {
         ) {
-            if (0 === $forum->no_sum_mess) {
+            if (0 == $forum->no_sum_mess) {
                 $this->user->num_posts = $this->user->num_posts + 1;
                 $this->user->num_posts = $this->user->num_posts + 1;
 
 
                 if (
                 if (

+ 2 - 2
app/Models/Pages/PostValidatorTrait.php

@@ -22,7 +22,7 @@ trait PostValidatorTrait
     public function vCheckSubject(Validator $v, string $subject, $attr, bool $executive): string
     public function vCheckSubject(Validator $v, string $subject, $attr, bool $executive): string
     {
     {
         // после цензуры заголовок темы путой
         // после цензуры заголовок темы путой
-        if ('' === $this->c->censorship->censor($subject)) {
+        if ('' == $this->c->censorship->censor($subject)) {
             $v->addError('No subject after censoring');
             $v->addError('No subject after censoring');
         // заголовок темы только заглавными буквами
         // заголовок темы только заглавными буквами
         } elseif (
         } elseif (
@@ -45,7 +45,7 @@ trait PostValidatorTrait
         $prepare = null;
         $prepare = null;
 
 
         // после цензуры текст сообщения пустой
         // после цензуры текст сообщения пустой
-        if ('' === $this->c->censorship->censor($message)) {
+        if ('' == $this->c->censorship->censor($message)) {
             $v->addError('No message after censoring');
             $v->addError('No message after censoring');
         // проверка парсером
         // проверка парсером
         } else {
         } else {

+ 3 - 3
app/Models/Pages/Profile.php

@@ -125,7 +125,7 @@ abstract class Profile extends Page
             ];
             ];
         }
         }
         if (
         if (
-            'edit' !== $type
+            'edit' != $type
             && $this->rules->editProfile
             && $this->rules->editProfile
         ) {
         ) {
             $btns['edit-profile'] = [
             $btns['edit-profile'] = [
@@ -138,14 +138,14 @@ abstract class Profile extends Page
                 __('Edit '),
                 __('Edit '),
             ];
             ];
         }
         }
-        if ('view' !== $type) {
+        if ('view' != $type) {
             $btns['view-profile'] = [
             $btns['view-profile'] = [
                 $this->curUser->link,
                 $this->curUser->link,
                 __('View '),
                 __('View '),
             ];
             ];
         }
         }
         if (
         if (
-            'config' !== $type
+            'config' != $type
             && $this->rules->editConfig
             && $this->rules->editConfig
         ) {
         ) {
             $btns['edit-settings'] = [
             $btns['edit-settings'] = [

+ 2 - 2
app/Models/Pages/Profile/Edit.php

@@ -172,11 +172,11 @@ class Edit extends Profile
      */
      */
     public function vCheckSignature(Validator $v, string $signature): string
     public function vCheckSignature(Validator $v, string $signature): string
     {
     {
-        if ('' !== $signature) {
+        if ('' != $signature) {
             $prepare = null;
             $prepare = null;
 
 
             // после цензуры текст сообщения пустой
             // после цензуры текст сообщения пустой
-            if ('' === $this->c->censorship->censor($signature)) {
+            if ('' == $this->c->censorship->censor($signature)) {
                 $v->addError('No signature after censoring');
                 $v->addError('No signature after censoring');
             // количество строк
             // количество строк
             } elseif (\substr_count($signature, "\n") >= $this->curUser->g_sig_lines) {
             } elseif (\substr_count($signature, "\n") >= $this->curUser->g_sig_lines) {

+ 3 - 3
app/Models/Pages/Profile/View.php

@@ -91,7 +91,7 @@ class View extends Profile
         // примечание администрации
         // примечание администрации
         if (
         if (
             $this->user->isAdmMod
             $this->user->isAdmMod
-            && '' !== $this->curUser->admin_note
+            && '' != $this->curUser->admin_note
         ) {
         ) {
             $form['sets']['note'] = [
             $form['sets']['note'] = [
                 'class'  => ['data'],
                 'class'  => ['data'],
@@ -109,7 +109,7 @@ class View extends Profile
 
 
         // личное
         // личное
         $fields = [];
         $fields = [];
-        if ('' !== $this->curUser->realname) {
+        if ('' != $this->curUser->realname) {
             $fields['realname'] = [
             $fields['realname'] = [
                 'class'   => ['pline'],
                 'class'   => ['pline'],
                 'type'    => 'str',
                 'type'    => 'str',
@@ -129,7 +129,7 @@ class View extends Profile
                 'caption' => 'Gender',
                 'caption' => 'Gender',
             ];
             ];
         }
         }
-        if ('' !== $this->curUser->location) {
+        if ('' != $this->curUser->location) {
             $fields['location'] = [
             $fields['location'] = [
                 'class'   => ['pline'],
                 'class'   => ['pline'],
                 'type'    => 'str',
                 'type'    => 'str',

+ 2 - 2
app/Models/Pages/Register.php

@@ -186,7 +186,7 @@ class Register extends Page
         // уведомление о регистрации
         // уведомление о регистрации
         if (
         if (
             1 === $this->c->config->b_regs_report
             1 === $this->c->config->b_regs_report
-            && '' !== $this->c->config->o_mailing_list
+            && '' != $this->c->config->o_mailing_list
         ) {
         ) {
             $this->c->Lang->load('common', $this->c->config->o_default_lang);
             $this->c->Lang->load('common', $this->c->config->o_default_lang);
 
 
@@ -294,7 +294,7 @@ class Register extends Page
         // уведомление о дубликате email
         // уведомление о дубликате email
         if (
         if (
             1 === $this->c->config->b_regs_report
             1 === $this->c->config->b_regs_report
-            && '' !== $this->c->config->o_mailing_list
+            && '' != $this->c->config->o_mailing_list
         ) {
         ) {
             $this->c->Lang->load('common', $this->c->config->o_default_lang);
             $this->c->Lang->load('common', $this->c->config->o_default_lang);
 
 

+ 2 - 2
app/Models/Pages/Search.php

@@ -481,7 +481,7 @@ class Search extends Page
                 ) {
                 ) {
                     break;
                     break;
                 }
                 }
-                if ('forums_subscriptions' === $action) {
+                if ('forums_subscriptions' == $action) {
                     $list = $model->actionF($action, $forum, $user->id);
                     $list = $model->actionF($action, $forum, $user->id);
                 } elseif ($asTopicsList) {
                 } elseif ($asTopicsList) {
                     $list = $model->actionT($action, $forum, $user->id);
                     $list = $model->actionT($action, $forum, $user->id);
@@ -514,7 +514,7 @@ class Search extends Page
 
 
             $this->nameTpl = 'forum';
             $this->nameTpl = 'forum';
 
 
-            if ('forums_subscriptions' === $action) {
+            if ('forums_subscriptions' == $action) {
                 $this->c->Lang->load('subforums');
                 $this->c->Lang->load('subforums');
 
 
                 $model->subforums = $list;
                 $model->subforums = $list;

+ 1 - 2
app/Models/Poll/Poll.php

@@ -274,8 +274,7 @@ class Poll extends DataModel
         foreach (\array_keys($this->question) as $q) {
         foreach (\array_keys($this->question) as $q) {
             if ($this->type[$q] > 1) {
             if ($this->type[$q] > 1) {
                 $count = \count($vote[$q]);
                 $count = \count($vote[$q]);
-
-                if (! $count) {
+                if (0 == $count) {
                     return __(['No vote on question %s', $q]);
                     return __(['No vote on question %s', $q]);
                 } elseif ($count > $this->type[$q]) {
                 } elseif ($count > $this->type[$q]) {
                     return __(['Too many answers selected in question %s', $q]);
                     return __(['Too many answers selected in question %s', $q]);

+ 8 - 8
app/Models/Post/Post.php

@@ -116,24 +116,24 @@ class Post extends DataModel
             return false;
             return false;
         } elseif ($this->c->user->isModerator($this)) {
         } elseif ($this->c->user->isModerator($this)) {
             return true;
             return true;
-        } elseif (1 === $this->parent->closed) {
+        } elseif ('1' == $this->parent->closed) {
             return false;
             return false;
         }
         }
 
 
         return $this->user->id === $this->c->user->id
         return $this->user->id === $this->c->user->id
             && (
             && (
                 (
                 (
-                    $this->id === $this->parent->first_post_id
+                    $this->id == $this->parent->first_post_id
                     && 1 === $this->c->user->g_delete_topics
                     && 1 === $this->c->user->g_delete_topics
                 )
                 )
                 || (
                 || (
-                    $this->id !== $this->parent->first_post_id
+                    $this->id != $this->parent->first_post_id
                     && 1 === $this->c->user->g_delete_posts
                     && 1 === $this->c->user->g_delete_posts
                 )
                 )
             )
             )
             && (
             && (
-                0 === $this->c->user->g_deledit_interval
-                || 1 === $this->edit_post
+                '0' == $this->c->user->g_deledit_interval
+                || '1' == $this->edit_post
                 || \time() - $this->posted < $this->c->user->g_deledit_interval
                 || \time() - $this->posted < $this->c->user->g_deledit_interval
             );
             );
     }
     }
@@ -165,15 +165,15 @@ class Post extends DataModel
             return false;
             return false;
         } elseif ($this->c->user->isModerator($this)) {
         } elseif ($this->c->user->isModerator($this)) {
             return true;
             return true;
-        } elseif (1 === $this->parent->closed) {
+        } elseif ('1' == $this->parent->closed) {
             return false;
             return false;
         }
         }
 
 
         return $this->user->id === $this->c->user->id
         return $this->user->id === $this->c->user->id
             && 1 === $this->c->user->g_edit_posts
             && 1 === $this->c->user->g_edit_posts
             && (
             && (
-                0 === $this->c->user->g_deledit_interval
-                || 1 === $this->edit_post
+                '0' == $this->c->user->g_deledit_interval
+                || '1' == $this->edit_post
                 || \time() - $this->posted < $this->c->user->g_deledit_interval
                 || \time() - $this->posted < $this->c->user->g_deledit_interval
                 || (
                 || (
                     $this->user->id === $this->editor_id
                     $this->user->id === $this->editor_id

+ 1 - 1
app/Models/Search/Execute.php

@@ -70,7 +70,7 @@ class Execute extends Method
             && \time() - $row['search_time'] < 60 * 5
             && \time() - $row['search_time'] < 60 * 5
         ) { //????
         ) { //????
             $result                    = \explode("\n", $row['search_data']);
             $result                    = \explode("\n", $row['search_data']);
-            $this->model->queryIds     = '' === $result[0] ? [] : \array_map('\\intval', \explode(',', $result[0]));
+            $this->model->queryIds     = '' == $result[0] ? [] : \array_map('\\intval', \explode(',', $result[0]));
             $this->model->queryNoCache = false;
             $this->model->queryNoCache = false;
 
 
             return true;
             return true;

+ 2 - 2
app/Models/SmileyList/Insert.php

@@ -23,8 +23,8 @@ class Insert extends Method
         if (
         if (
             isset($data['id'])
             isset($data['id'])
             || ! isset($data['sm_code'], $data['sm_position'], $data['sm_image'])
             || ! isset($data['sm_code'], $data['sm_position'], $data['sm_image'])
-            || '' === $data['sm_code']
-            || '' === $data['sm_image']
+            || '' == $data['sm_code']
+            || '' == $data['sm_image']
         ) {
         ) {
             throw new InvalidArgumentException('Expected an array with a smile description');
             throw new InvalidArgumentException('Expected an array with a smile description');
         }
         }

+ 2 - 2
app/Models/SmileyList/Update.php

@@ -24,8 +24,8 @@ class Update extends Method
         if (
         if (
             isset($data['id'])
             isset($data['id'])
             || ! isset($data['sm_code'], $data['sm_position'], $data['sm_image'])
             || ! isset($data['sm_code'], $data['sm_position'], $data['sm_image'])
-            || '' === $data['sm_code']
-            || '' === $data['sm_image']
+            || '' == $data['sm_code']
+            || '' == $data['sm_image']
         ) {
         ) {
             throw new InvalidArgumentException('Expected an array with a smile description');
             throw new InvalidArgumentException('Expected an array with a smile description');
         }
         }

+ 1 - 1
app/Models/User/Current.php

@@ -122,7 +122,7 @@ class Current extends Action
      */
      */
     protected function isBot(string $agent) /* string|false */
     protected function isBot(string $agent) /* string|false */
     {
     {
-        if ('' === $agent) {
+        if ('' == $agent) {
             return false;
             return false;
         }
         }
         $agentL = \strtolower($agent);
         $agentL = \strtolower($agent);

+ 1 - 1
app/Models/User/Filter.php

@@ -57,7 +57,7 @@ class Filter extends Action
                         || 'ILIKE' === $like
                         || 'ILIKE' === $like
                     ) {
                     ) {
                         // кроме * есть другие символы
                         // кроме * есть другие символы
-                        if ('' !== \trim($rule[1], '*')) {
+                        if ('' != \trim($rule[1], '*')) {
                             $where[] = "u.{$field} {$like} ?{$fields[$field]} ESCAPE '#'";
                             $where[] = "u.{$field} {$like} ?{$fields[$field]} ESCAPE '#'";
                             $vars[]  = \str_replace(['#', '%', '_', '*'], ['##', '#%', '#_', '%'], $rule[1]);
                             $vars[]  = \str_replace(['#', '%', '_', '*'], ['##', '#%', '#_', '%'], $rule[1]);
                         }
                         }

+ 2 - 2
app/Models/User/Promote.php

@@ -24,7 +24,7 @@ class Promote extends Action
         $count = \count($args);
         $count = \count($args);
 
 
         // перемещение всех пользователей из группы 0 в группу 1
         // перемещение всех пользователей из группы 0 в группу 1
-        if (2 === $count) {
+        if (2 == $count) {
             $vars = [
             $vars = [
                 ':old' => $args[0]->g_id,
                 ':old' => $args[0]->g_id,
                 ':new' => $args[1]->g_id,
                 ':new' => $args[1]->g_id,
@@ -35,7 +35,7 @@ class Promote extends Action
 
 
             return $this->c->DB->exec($query, $vars);
             return $this->c->DB->exec($query, $vars);
         // продвижение всех пользователей в группе 0
         // продвижение всех пользователей в группе 0
-        } elseif (1 === $count) {
+        } elseif (1 == $count) {
             $vars = [
             $vars = [
                 ':old'   => $args[0]->g_id,
                 ':old'   => $args[0]->g_id,
                 ':new'   => $args[0]->g_promote_next_group,
                 ':new'   => $args[0]->g_promote_next_group,

+ 3 - 3
app/Models/User/User.php

@@ -220,9 +220,9 @@ class User extends DataModel
     {
     {
         if ($this->isBanByName) {
         if ($this->isBanByName) {
             return __('Banned');
             return __('Banned');
-        } elseif ('' !== $this->title) {
+        } elseif ('' != $this->title) {
             return $this->censorTitle;
             return $this->censorTitle;
-        } elseif ('' !== $this->g_user_title) {
+        } elseif ('' != $this->g_user_title) {
             return $this->censorG_user_title;
             return $this->censorG_user_title;
         } elseif ($this->isGuest) {
         } elseif ($this->isGuest) {
             return __('Guest');
             return __('Guest');
@@ -248,7 +248,7 @@ class User extends DataModel
     {
     {
         return $this->g_sig_length > 0
         return $this->g_sig_length > 0
             && $this->g_sig_lines > 0
             && $this->g_sig_lines > 0
-            && '' !== $this->signature;
+            && '' != $this->signature;
     }
     }
 
 
     /**
     /**

+ 2 - 2
app/functions.php

@@ -117,9 +117,9 @@ function dt(int $arg, bool $dateOnly = false, string $dateFormat = null, string
     if (! $noText) {
     if (! $noText) {
         $now = \time() + $diff;
         $now = \time() + $diff;
 
 
-        if ($date === \gmdate($dateFormat, $now)) {
+        if ($date == \gmdate($dateFormat, $now)) {
             $date = __('Today');
             $date = __('Today');
-        } elseif ($date === \gmdate($dateFormat, $now - 86400)) {
+        } elseif ($date == \gmdate($dateFormat, $now - 86400)) {
             $date = __('Yesterday');
             $date = __('Yesterday');
         }
         }
     }
     }

+ 1 - 1
app/templates/layouts/main.forkbb.php

@@ -16,7 +16,7 @@
   <div id="fork" @if ($p->fNavigation) class="f-with-nav" @endif>
   <div id="fork" @if ($p->fNavigation) class="f-with-nav" @endif>
     <header id="fork-header">
     <header id="fork-header">
       <h1 id="id-fhth1"><a id="id-fhtha" href="{{ $p->fRootLink }}">{{ $p->fTitle }}</a></h1>
       <h1 id="id-fhth1"><a id="id-fhtha" href="{{ $p->fRootLink }}">{{ $p->fTitle }}</a></h1>
-@if ('' !== $p->fDescription)
+@if ('' != $p->fDescription)
       <p id="id-fhtdesc">{!! $p->fDescription !!}</p>
       <p id="id-fhtdesc">{!! $p->fDescription !!}</p>
 @endif
 @endif
     </header>
     </header>

+ 2 - 2
app/templates/layouts/subforums.forkbb.php

@@ -10,7 +10,7 @@
                       <a class="f-ftname" href="{{ $cur->redirect_url }}">{{ $cur->forum_name }}</a>
                       <a class="f-ftname" href="{{ $cur->redirect_url }}">{{ $cur->forum_name }}</a>
                     </span>
                     </span>
                   </h3>
                   </h3>
-        @if ('' !== $cur->forum_desc)
+        @if ('' != $cur->forum_desc)
                   <p class="f-fdesc">{!! $cur->forum_desc !!}</p>
                   <p class="f-fdesc">{!! $cur->forum_desc !!}</p>
         @endif
         @endif
                 </div>
                 </div>
@@ -45,7 +45,7 @@
             @endforeach
             @endforeach
                   </dl><!-- endinline -->
                   </dl><!-- endinline -->
         @endif
         @endif
-        @if ('' !== $cur->forum_desc)
+        @if ('' != $cur->forum_desc)
                   <p class="f-fdesc">{!! $cur->forum_desc !!}</p>
                   <p class="f-fdesc">{!! $cur->forum_desc !!}</p>
         @endif
         @endif
         @if ($cur->moderators)
         @if ($cur->moderators)

+ 1 - 1
app/templates/pm/topic.forkbb.php

@@ -79,7 +79,7 @@
             </ul>
             </ul>
         @if (! $post->user->isGuest && $p->user->showUserInfo)
         @if (! $post->user->isGuest && $p->user->showUserInfo)
             <ul class="f-user-info-add">
             <ul class="f-user-info-add">
-            @if ($p->user->isAdmMod && '' !== $post->user->admin_note)
+            @if ($p->user->isAdmMod && '' != $post->user->admin_note)
               <li class="f-admin-note" title="{{ __('Admin note') }}">{{ $post->user->admin_note }}</li>
               <li class="f-admin-note" title="{{ __('Admin note') }}">{{ $post->user->admin_note }}</li>
             @endif
             @endif
               <li>{!! __(['Registered: %s', dt($post->user->registered, true)]) !!}</li>
               <li>{!! __(['Registered: %s', dt($post->user->registered, true)]) !!}</li>

+ 1 - 1
app/templates/topic.forkbb.php

@@ -91,7 +91,7 @@
             </ul>
             </ul>
         @if (! $post->user->isGuest && $p->user->showUserInfo)
         @if (! $post->user->isGuest && $p->user->showUserInfo)
             <ul class="f-user-info-add">
             <ul class="f-user-info-add">
-            @if ($p->user->isAdmMod && '' !== $post->user->admin_note)
+            @if ($p->user->isAdmMod && '' != $post->user->admin_note)
               <li class="f-admin-note" title="{{ __('Admin note') }}">{{ $post->user->admin_note }}</li>
               <li class="f-admin-note" title="{{ __('Admin note') }}">{{ $post->user->admin_note }}</li>
             @endif
             @endif
               <li>{!! __(['Registered: %s', dt($post->user->registered, true)]) !!}</li>
               <li>{!! __(['Registered: %s', dt($post->user->registered, true)]) !!}</li>