Forráskód Böngészése

Delete comments that do not make sense

Visman 3 éve
szülő
commit
84e864a24d

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

@@ -45,7 +45,7 @@ class Categories extends Admin
                 $this->c->categories->update();
                 $this->c->categories->update();
 
 
                 if (\strlen($v->new) > 0) {
                 if (\strlen($v->new) > 0) {
-                    $this->c->categories->insert($v->new); //????
+                    $this->c->categories->insert($v->new);
                 }
                 }
 
 
                 $this->c->forums->reset();
                 $this->c->forums->reset();

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

@@ -26,7 +26,7 @@ class Host extends Admin
         $ip = \filter_var($args['ip'], \FILTER_VALIDATE_IP);
         $ip = \filter_var($args['ip'], \FILTER_VALIDATE_IP);
 
 
         if (false === $ip) {
         if (false === $ip) {
-            return $this->c->Message->message('Bad request', false); // ??????
+            return $this->c->Message->message('Bad request', false);
         }
         }
 
 
         $host = \gethostbyaddr($ip);
         $host = \gethostbyaddr($ip);

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

@@ -1195,7 +1195,7 @@ class Install extends Admin
             [FORK_GROUP_NEW_MEMBER, __('New members'),    __('New member'),     0,          0,                0,                  0,                      0,               0,                   1,            1,            1,              1,             1,            1,              1,               0,            0,           1,        1,              1,            60,           30,             120,           60,             5,                   FORK_GROUP_MEMBER,     ],
             [FORK_GROUP_NEW_MEMBER, __('New members'),    __('New member'),     0,          0,                0,                  0,                      0,               0,                   1,            1,            1,              1,             1,            1,              1,               0,            0,           1,        1,              1,            60,           30,             120,           60,             5,                   FORK_GROUP_MEMBER,     ],
         ];
         ];
 
 
-        foreach ($groups as $group) { //???? $db_type != 'pgsql'
+        foreach ($groups as $group) {
             $this->c->DB->exec('INSERT INTO ::groups (g_id, g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_post_links, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood, g_promote_min_posts, g_promote_next_group) VALUES (?i, ?s, ?s, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i)', $group) ;
             $this->c->DB->exec('INSERT INTO ::groups (g_id, g_title, g_user_title, g_moderator, g_mod_edit_users, g_mod_rename_users, g_mod_change_passwords, g_mod_ban_users, g_mod_promote_users, g_read_board, g_view_users, g_post_replies, g_post_topics, g_edit_posts, g_delete_posts, g_delete_topics, g_post_links, g_set_title, g_search, g_search_users, g_send_email, g_post_flood, g_search_flood, g_email_flood, g_report_flood, g_promote_min_posts, g_promote_next_group) VALUES (?i, ?s, ?s, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i, ?i)', $group) ;
         }
         }
 
 

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

@@ -120,7 +120,7 @@ class Logs extends Admin
                 ) {
                 ) {
                     return $this->c->Redirect->page('AdminLogs')->message('Log deleted redirect');
                     return $this->c->Redirect->page('AdminLogs')->message('Log deleted redirect');
                 }
                 }
-            } catch (Throwable $e) { // ???? будет работать или нет?
+            } catch (Throwable $e) {
                 $this->c->Log->error('Delete log: failed', [
                 $this->c->Log->error('Delete log: failed', [
                     'exception' => $e,
                     'exception' => $e,
                     'headers'   => false,
                     'headers'   => false,

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

@@ -506,7 +506,7 @@ class Options extends Admin
                     'caption' => 'Use avatars label',
                     'caption' => 'Use avatars label',
                     'help'    => 'Use avatars help',
                     'help'    => 'Use avatars help',
                 ],
                 ],
-                'o_avatars_dir' => [ //????
+                'o_avatars_dir' => [
                     'type'      => 'text',
                     'type'      => 'text',
                     'maxlength' => '255',
                     'maxlength' => '255',
                     'value'     => $config->o_avatars_dir,
                     'value'     => $config->o_avatars_dir,

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

@@ -277,7 +277,7 @@ class Update extends Admin
         $this->okPass = true;
         $this->okPass = true;
 
 
         if (\substr($this->c->DB_DSN, 0, 6) === 'sqlite') {
         if (\substr($this->c->DB_DSN, 0, 6) === 'sqlite') {
-            if (! \hash_equals($this->c->DB_DSN, "sqlite:{$dbpass}")) {  // ????
+            if (! \hash_equals($this->c->DB_DSN, "sqlite:{$dbpass}")) {
                 $this->okPass = false;
                 $this->okPass = false;
 
 
                 $v->addError(['Invalid file error', self::CONFIG_FILE]);
                 $v->addError(['Invalid file error', self::CONFIG_FILE]);

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

@@ -84,7 +84,7 @@ class Action extends Users
         $ids = $this->checkSelected(\explode('-', $args['ids']), $args['action'], $profile);
         $ids = $this->checkSelected(\explode('-', $args['ids']), $args['action'], $profile);
         if (false === $ids) {
         if (false === $ids) {
             $message = $this->c->Message->message('Action not available');
             $message = $this->c->Message->message('Action not available');
-            $message->fIswev = $this->fIswev; //????
+            $message->fIswev = $this->fIswev; // тут идет дополнение, а не замена
 
 
             return $message;
             return $message;
         }
         }

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

@@ -31,7 +31,7 @@ class Misc extends Page
             return $this->c->Redirect->url($forum->link)->message($this->c->Csrf->getError());
             return $this->c->Redirect->url($forum->link)->message($this->c->Csrf->getError());
         }
         }
 
 
-        $this->c->forums->markread($forum, $this->user); // ???? флуд интервал?
+        $this->c->forums->markread($forum, $this->user);
 
 
         $this->c->Lang->load('misc');
         $this->c->Lang->load('misc');
 
 

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

@@ -28,7 +28,7 @@ class PM extends Page
             if ('' === \trim($second, '1234567890')) {
             if ('' === \trim($second, '1234567890')) {
                 $second = (int) $second;
                 $second = (int) $second;
 
 
-                if ($second < 1) { // ???? вынести все в роутер?
+                if ($second < 1) {
                     return $this->c->Message->message('Bad request');
                     return $this->c->Message->message('Bad request');
                 }
                 }
             } elseif (
             } elseif (

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

@@ -56,7 +56,7 @@ class Redirect extends Page
         $this->nameTpl = 'layouts/redirect';
         $this->nameTpl = 'layouts/redirect';
         $this->robots  = 'noindex';
         $this->robots  = 'noindex';
         $this->message = $message;
         $this->message = $message;
-        $this->timeout = $this->c->config->i_redirect_delay;  //???? перенести в заголовки?
+        $this->timeout = $this->c->config->i_redirect_delay;
 
 
         return $this;
         return $this;
     }
     }

+ 1 - 1
app/Models/Report/Save.php

@@ -63,7 +63,7 @@ class Save extends Action
             throw new RuntimeException('The model has ID');
             throw new RuntimeException('The model has ID');
         }
         }
 
 
-        $report->created = \time(); //????
+        $report->created = \time();
 
 
         $attrs  = $report->getAttrs();
         $attrs  = $report->getAttrs();
         $fileds = $this->c->dbMap->reports;
         $fileds = $this->c->dbMap->reports;

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

@@ -220,7 +220,6 @@ class Execute extends Method
         }
         }
 
 
         //???? нужен индекс по авторам сообщений/тем?
         //???? нужен индекс по авторам сообщений/тем?
-        //???? что делать с подчеркиванием в именах?
         if ('*' !== $v->author) {
         if ('*' !== $v->author) {
             $usePIdx                 = true;
             $usePIdx                 = true;
             $vars[':author']         = \str_replace(['#', '_', '*', '?'], ['##', '#_', '%', '_'], $v->author);
             $vars[':author']         = \str_replace(['#', '_', '*', '?'], ['##', '#_', '%', '_'], $v->author);