浏览代码

Code style, remove unnecessary comments and remove unused code

Visman 4 年之前
父节点
当前提交
d5836d258c

+ 1 - 1
app/Core/Container.php

@@ -57,7 +57,7 @@ class Container
      */
      */
     public function __get(string $id) /* : mixed */
     public function __get(string $id) /* : mixed */
     {
     {
-        if (\array_key_exists($id, $this->instances)) { //???? isset($this->instances[$id]) ||
+        if (\array_key_exists($id, $this->instances)) {
             return $this->instances[$id];
             return $this->instances[$id];
         } elseif (false !== \strpos($id, '.')) {
         } elseif (false !== \strpos($id, '.')) {
             $tree    = \explode('.', $id);
             $tree    = \explode('.', $id);

+ 0 - 11
app/Models/Pages/Admin/Bans.php

@@ -131,7 +131,6 @@ class Bans extends Admin
         $form['sets']['search-info'] = [
         $form['sets']['search-info'] = [
             'info' => [
             'info' => [
                 'info1' => [
                 'info1' => [
-                    'type'  => '', //????
                     'value' => __('Ban search info'),
                     'value' => __('Ban search info'),
                 ],
                 ],
             ],
             ],
@@ -294,16 +293,6 @@ class Bans extends Admin
             'info'      => __('Expire date help'),
             'info'      => __('Expire date help'),
             'value'     => $data['expire'] ?? null,
             'value'     => $data['expire'] ?? null,
         ];
         ];
-/*
-        $yn     = [1 => __('Yes'), 0 => __('No')];
-        $fields['o_default_dst'] = [
-            'type'      => 'radio',
-            'value'     => $config->o_default_dst,
-            'values'    => $yn,
-            'caption'   => __('DST label'),
-            'info'      => __('DST help'),
-        ];
-*/
         $form['sets']['ban-exp'] = [
         $form['sets']['ban-exp'] = [
             'legend' => __('Message expiry subhead'),
             'legend' => __('Message expiry subhead'),
             'fields' => $fields,
             'fields' => $fields,

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

@@ -221,7 +221,6 @@ class Categories extends Admin
                 'del-info' => [
                 'del-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Delete category warn'),
                             'value' => __('Delete category warn'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],

+ 0 - 1
app/Models/Pages/Admin/Censoring.php

@@ -76,7 +76,6 @@ class Censoring extends Admin
                 'onoff-info' => [
                 'onoff-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Censoring info'),
                             'value' => __('Censoring info'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],

+ 0 - 3
app/Models/Pages/Admin/Forums.php

@@ -159,7 +159,6 @@ class Forums extends Admin
                     $form['sets']["category{$forum->cat_id}-info"] = [
                     $form['sets']["category{$forum->cat_id}-info"] = [
                         'info' => [
                         'info' => [
                             'info1' => [
                             'info1' => [
-                                'type'  => '', //????
                                 'value' => $forum->cat_name,
                                 'value' => $forum->cat_name,
                             ],
                             ],
                         ],
                         ],
@@ -307,7 +306,6 @@ class Forums extends Admin
                 [
                 [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Delete forum warn'),
                             'value' => __('Delete forum warn'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],
@@ -522,7 +520,6 @@ class Forums extends Admin
         $form['sets']['forum-info'] = [
         $form['sets']['forum-info'] = [
             'info' => [
             'info' => [
                 'info1' => [
                 'info1' => [
-                    'type'  => '', //????
                     'value' => __('Group permissions info', $this->c->Router->link('AdminGroups'), __('User groups')),
                     'value' => __('Group permissions info', $this->c->Router->link('AdminGroups'), __('User groups')),
                     'html'  => true,
                     'html'  => true,
                 ],
                 ],

+ 0 - 3
app/Models/Pages/Admin/Groups.php

@@ -379,7 +379,6 @@ class Groups extends Admin
             $form['sets']['def-info'] = [
             $form['sets']['def-info'] = [
                 'info' => [
                 'info' => [
                     'info1' => [
                     'info1' => [
-                        'type'  => '', //????
                         'value' => __('Group settings info'),
                         'value' => __('Group settings info'),
                     ],
                     ],
                 ],
                 ],
@@ -637,7 +636,6 @@ class Groups extends Admin
             $form['sets']['mod-info'] = [
             $form['sets']['mod-info'] = [
                 'info' => [
                 'info' => [
                     'info1' => [
                     'info1' => [
-                        'type'  => '', //????
                         'value' => __('Moderator info'),
                         'value' => __('Moderator info'),
                     ],
                     ],
                 ],
                 ],
@@ -808,7 +806,6 @@ class Groups extends Admin
         $form['sets']['conf-info'] = [
         $form['sets']['conf-info'] = [
             'info' => [
             'info' => [
                 'info1' => [
                 'info1' => [
-                    'type'  => '', //????
                     'value' => __('Confirm delete warn'),
                     'value' => __('Confirm delete warn'),
                     'html'  => true,
                     'html'  => true,
                 ],
                 ],

+ 0 - 6
app/Models/Pages/Admin/Install.php

@@ -216,12 +216,10 @@ class Install extends Admin
                 'db-info' => [
                 'db-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Database setup'),
                             'value' => __('Database setup'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],
                         'info2' => [
                         'info2' => [
-                            'type'  => '', //????
                             'value' => __('Info 1'),
                             'value' => __('Info 1'),
                         ],
                         ],
                     ],
                     ],
@@ -273,12 +271,10 @@ class Install extends Admin
                 'adm-info' => [
                 'adm-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Administration setup'),
                             'value' => __('Administration setup'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],
                         'info2' => [
                         'info2' => [
-                            'type'  => '', //????
                             'value' => __('Info 7'),
                             'value' => __('Info 7'),
                         ],
                         ],
                     ],
                     ],
@@ -317,12 +313,10 @@ class Install extends Admin
                 'board-info' => [
                 'board-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Board setup'),
                             'value' => __('Board setup'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],
                         'info2' => [
                         'info2' => [
-                            'type'  => '', //????
                             'value' => __('Info 11'),
                             'value' => __('Info 11'),
                         ],
                         ],
                     ],
                     ],

+ 0 - 2
app/Models/Pages/Admin/Maintenance.php

@@ -108,7 +108,6 @@ class Maintenance extends Admin
                 'indx-info' => [
                 'indx-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Rebuild index info'),
                             'value' => __('Rebuild index info'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],
@@ -145,7 +144,6 @@ class Maintenance extends Admin
                 'indx-info2' => [
                 'indx-info2' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Rebuild completed info'),
                             'value' => __('Rebuild completed info'),
                             'html'  => true,
                             'html'  => true,
                         ],
                         ],

+ 0 - 1
app/Models/Pages/Admin/Reports.php

@@ -122,7 +122,6 @@ class Reports extends Admin
             $form['sets'][] = [
             $form['sets'][] = [
                 'info' => [
                 'info' => [
                     'info1' => [
                     'info1' => [
-                        'type'  => '', //????
                         'value' => $noZapped ? __('No new reports') : __('No zapped reports'),
                         'value' => $noZapped ? __('No new reports') : __('No zapped reports'),
                     ],
                     ],
                 ],
                 ],

+ 0 - 4
app/Models/Pages/Admin/Update.php

@@ -285,9 +285,7 @@ class Update extends Admin
                 'update-info' => [
                 'update-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Update message'),
                             'value' => __('Update message'),
-#                            'html'  => true,
                         ],
                         ],
                     ],
                     ],
                 ],
                 ],
@@ -313,9 +311,7 @@ class Update extends Admin
                 'member-info' => [
                 'member-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Members message'),
                             'value' => __('Members message'),
-//                            'html'  => true,
                         ],
                         ],
                     ],
                     ],
                 ],
                 ],

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

@@ -189,7 +189,6 @@ class Action extends Users
                 'info2' => [
                 'info2' => [
                     'info' => [
                     'info' => [
                         'info2' => [
                         'info2' => [
-                            'type'    => '', //????
                             'value'   => __('Delete warning'),
                             'value'   => __('Delete warning'),
                             'html'    => true,
                             'html'    => true,
                         ],
                         ],

+ 0 - 1
app/Models/Pages/Admin/Users/View.php

@@ -174,7 +174,6 @@ class View extends Users
         $form['sets']['search-info'] = [
         $form['sets']['search-info'] = [
             'info' => [
             'info' => [
                 'info1' => [
                 'info1' => [
-                    'type'  => '', //????
                     'value' => __('User search info'),
                     'value' => __('User search info'),
                 ],
                 ],
             ],
             ],

+ 0 - 2
app/Models/Pages/Delete.php

@@ -96,11 +96,9 @@ class Delete extends Page
                 'info' => [
                 'info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'    => '', //????
                             'value'   => __('Topic') . ' «' . $post->parent->censorSubject . '»',
                             'value'   => __('Topic') . ' «' . $post->parent->censorSubject . '»',
                         ],
                         ],
                         'info2' => [
                         'info2' => [
-                            'type'    => '', //????
                             'value'   => __($deleteTopic ? 'Topic by' : 'Reply by', $post->poster, \ForkBB\dt($post->posted)),
                             'value'   => __($deleteTopic ? 'Topic by' : 'Reply by', $post->poster, \ForkBB\dt($post->posted)),
                             'html'    => true,
                             'html'    => true,
                         ],
                         ],

+ 0 - 1
app/Models/Pages/Email.php

@@ -141,7 +141,6 @@ class Email extends Page
                 'email-info' => [
                 'email-info' => [
                     'info' => [
                     'info' => [
                         'info1' => [
                         'info1' => [
-                            'type'  => '', //????
                             'value' => __('Email disclosure note'),
                             'value' => __('Email disclosure note'),
                         ],
                         ],
                     ],
                     ],

+ 3 - 6
app/Models/Pages/Moderate.php

@@ -552,18 +552,15 @@ class Moderate extends Page
         $form['sets']['info'] = [
         $form['sets']['info'] = [
             'info' => [
             'info' => [
                 'info1' => [
                 'info1' => [
-                    'type'    => '', //????
-                    'value'   => \implode('<br>', $headers),
-                    'html'    => true,
+                    'value' => \implode('<br>', $headers),
+                    'html'  => true,
                 ],
                 ],
             ],
             ],
         ];
         ];
 
 
         if ($this->firstTopic instanceof Topic) {
         if ($this->firstTopic instanceof Topic) {
             $form['sets']['info']['info']['info2'] = [
             $form['sets']['info']['info']['info2'] = [
-                'type'    => '', //????
-                'value'   => __('All posts will be posted in the «%s» topic', $this->firstTopic->censorSubject),
-//                'html'    => true,
+                'value' => __('All posts will be posted in the «%s» topic', $this->firstTopic->censorSubject),
             ];
             ];
         }
         }
 
 

+ 0 - 1
app/Models/Pages/Profile/Mod.php

@@ -139,7 +139,6 @@ class Mod extends Profile
                     $form['sets']["category{$forum->cat_id}-info"] = [
                     $form['sets']["category{$forum->cat_id}-info"] = [
                         'info' => [
                         'info' => [
                             'info1' => [
                             'info1' => [
-                                'type'  => '', //????
                                 'value' => $forum->cat_name,
                                 'value' => $forum->cat_name,
                             ],
                             ],
                         ],
                         ],

+ 0 - 1
app/Models/Topic/CalcStat.php

@@ -60,7 +60,6 @@ class CalcStat extends Method
                 : $result['posted'];
                 : $result['posted'];
         }
         }
 
 
-        //????
         $this->model->num_replies = $numReplies;
         $this->model->num_replies = $numReplies;
 
 
         return $this->model;
         return $this->model;

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

@@ -81,7 +81,7 @@ class Load extends Action
 
 
         if (empty($data)) {
         if (empty($data)) {
             return null;
             return null;
-        } elseif (\count($data) > 1) { // ???? невыполнимое условие?!
+        } elseif (\count($data) > 1) {
             throw new ForkException('Multiple users found');
             throw new ForkException('Multiple users found');
         } else {
         } else {
             return $this->manager->create($data[0]);
             return $this->manager->create($data[0]);

+ 3 - 3
app/templates/forum.forkbb.php

@@ -158,11 +158,11 @@
           <a class="f-btn f-btn-markread f-opacity" title="{!! __('Mark forum read') !!}" href="{!! $p->model->linkMarkRead !!}"><span>{!! __('All is read') !!}</span></a>
           <a class="f-btn f-btn-markread f-opacity" title="{!! __('Mark forum read') !!}" href="{!! $p->model->linkMarkRead !!}"><span>{!! __('All is read') !!}</span></a>
             @endif
             @endif
             @if ($p->model->canSubscription)
             @if ($p->model->canSubscription)
-              @if ($p->model->is_subscribed)
+                @if ($p->model->is_subscribed)
           <a class="f-btn f-btn-unsubscribe f-opacity" title="{!! __('Unsubscribe forum') !!}" href="{!! $p->model->linkUnsubscribe !!}"><span>{!! __('Unsubscribe') !!}</span></a>
           <a class="f-btn f-btn-unsubscribe f-opacity" title="{!! __('Unsubscribe forum') !!}" href="{!! $p->model->linkUnsubscribe !!}"><span>{!! __('Unsubscribe') !!}</span></a>
-              @else
+                @else
           <a class="f-btn f-btn-subscribe f-opacity" title="{!! __('Subscribe forum') !!}" href="{!! $p->model->linkSubscribe !!}"><span>{!! __('Subscribe') !!}</span></a>
           <a class="f-btn f-btn-subscribe f-opacity" title="{!! __('Subscribe forum') !!}" href="{!! $p->model->linkSubscribe !!}"><span>{!! __('Subscribe') !!}</span></a>
-              @endif
+                @endif
             @endif
             @endif
             @if ($p->model->canCreateTopic)
             @if ($p->model->canCreateTopic)
           <a class="f-btn f-btn-create-topic" title="{!! __('Post topic') !!}" href="{!! $p->model->linkCreateTopic !!}"><span>{!! __('Post topic') !!}</span></a>
           <a class="f-btn f-btn-create-topic" title="{!! __('Post topic') !!}" href="{!! $p->model->linkCreateTopic !!}"><span>{!! __('Post topic') !!}</span></a>