浏览代码

2018-03-19

Visman 7 年之前
父节点
当前提交
fd012e8dfe

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

@@ -61,7 +61,7 @@ class Categories extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'submit'  => [
+                'submit' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Save changes'),
                     'accesskey' => 's',
@@ -76,23 +76,23 @@ class Categories extends Admin
                 'type'      => 'text',
                 'maxlength' => 80,
                 'value'     => $row['cat_name'],
-                'caption'     => \ForkBB\__('Category name label'),
+                'caption'   => \ForkBB\__('Category name label'),
                 'required'  => true,
             ];
             $fieldset["form[{$key}][disp_position]"] = [
-                'class' => ['position', 'inline'],
-                'type'  => 'number',
-                'min'   => 0,
-                'max'   => 9999999999,
-                'value' => $row['disp_position'],
+                'class'   => ['position', 'inline'],
+                'type'    => 'number',
+                'min'     => 0,
+                'max'     => 9999999999,
+                'value'   => $row['disp_position'],
                 'caption' => \ForkBB\__('Category position label'),
             ];
             $fieldset[] = [
-                'class' => ['delete', 'inline'],
-                'type'  => 'btn',
-                'value' => '❌',
+                'class'   => ['delete', 'inline'],
+                'type'    => 'btn',
+                'value'   => '❌',
                 'caption' => \ForkBB\__('Delete'),
-                'link'  => $this->c->Router->link('AdminCategoriesDelete', ['id' => $key]),
+                'link'    => $this->c->Router->link('AdminCategoriesDelete', ['id' => $key]),
             ];
         }
         $form['sets'][] = [
@@ -105,7 +105,7 @@ class Categories extends Admin
                     'class'     => 'new',
                     'type'      => 'text',
                     'maxlength' => 80,
-                    'caption'     => \ForkBB\__('Add category label'),
+                    'caption'   => \ForkBB\__('Add category label'),
                     'info'      => \ForkBB\__('Add category help', $this->c->Router->link('AdminForums'), \ForkBB\__('Forums')),
                 ],
             ],
@@ -174,12 +174,12 @@ class Categories extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'delete'  => [
+                'delete' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Delete category'),
                     'accesskey' => 'd',
                 ],
-                'cancel'  => [
+                'cancel' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Cancel'),
                 ],
@@ -189,7 +189,7 @@ class Categories extends Admin
         $form['sets'][] = [
             'fields' => [
                 'confirm' => [
-                    'caption'   => \ForkBB\__('Confirm delete'),
+                    'caption' => \ForkBB\__('Confirm delete'),
                     'type'    => 'checkbox',
                     'label'   => \ForkBB\__('I want to delete the category %s', $category['cat_name']),
                     'value'   => '1',

+ 9 - 9
app/Models/Pages/Admin/Censoring.php

@@ -57,11 +57,11 @@ class Censoring extends Admin
                 [
                     'fields' => [
                         'o_censoring' => [
-                            'type'   => 'radio',
-                            'value'  => $this->c->config->o_censoring,
-                            'values' => [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')],
-                            'caption'  => \ForkBB\__('Censor words label'),
-                            'info'   => \ForkBB\__('Censor words help'),
+                            'type'    => 'radio',
+                            'value'   => $this->c->config->o_censoring,
+                            'values'  => [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')],
+                            'caption' => \ForkBB\__('Censor words label'),
+                            'info'    => \ForkBB\__('Censor words help'),
                         ],
                     ],
                 ],
@@ -91,14 +91,14 @@ class Censoring extends Admin
                 'type'      => 'text',
                 'maxlength' => 60,
                 'value'     => $row['search_for'],
-                'caption'     => \ForkBB\__('Censored word label'),
+                'caption'   => \ForkBB\__('Censored word label'),
             ];
             $fieldset["form[{$id}][replace_with]"] = [
                 'class'     => ['censor', 'inline'],
                 'type'      => 'text',
                 'maxlength' => 60,
                 'value'     => $row['replace_with'],
-                'caption'     => \ForkBB\__('Replacement label'),
+                'caption'   => \ForkBB\__('Replacement label'),
             ];
         }
         $fieldset["form[0][search_for]"] = [
@@ -106,14 +106,14 @@ class Censoring extends Admin
             'type'      => 'text',
             'maxlength' => 60,
             'value'     => '',
-            'caption'     => \ForkBB\__('Censored word label'),
+            'caption'   => \ForkBB\__('Censored word label'),
         ];
         $fieldset["form[0][replace_with]"] = [
             'class'     => ['censor', 'inline'],
             'type'      => 'text',
             'maxlength' => 60,
             'value'     => '',
-            'caption'     => \ForkBB\__('Replacement label'),
+            'caption'   => \ForkBB\__('Replacement label'),
         ];
 
         $form['sets'][] = [

+ 31 - 31
app/Models/Pages/Admin/Forums.php

@@ -125,13 +125,13 @@ class Forums extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'new'  => [
+                'new' => [
                     'type'      => 'btn',
                     'value'     => \ForkBB\__('New forum'),
                     'link'      => $this->c->Router->link('AdminForumsNew'),
                     'accesskey' => 'n',
                 ],
-                'update'  => [
+                'update' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Update positions'),
                     'accesskey' => 'u',
@@ -168,26 +168,26 @@ class Forums extends Admin
                 }
 
                 $fieldset[] = [
-                    'class'     => ['name', 'inline', 'depth' . $forum->depth],
-                    'type'      => 'btn',
-                    'value'     => $forum->forum_name,
-                    'caption'     => \ForkBB\__('Forum label'),
-                    'link'      => $this->c->Router->link('AdminForumsEdit', ['id' => $forum->id]),
+                    'class'   => ['name', 'inline', 'depth' . $forum->depth],
+                    'type'    => 'btn',
+                    'value'   => $forum->forum_name,
+                    'caption' => \ForkBB\__('Forum label'),
+                    'link'    => $this->c->Router->link('AdminForumsEdit', ['id' => $forum->id]),
                 ];
                 $fieldset["form[{$forum->id}][disp_position]"] = [
-                    'class' => ['position', 'inline'],
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 9999999999,
-                    'value' => $forum->disp_position,
+                    'class'   => ['position', 'inline'],
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 9999999999,
+                    'value'   => $forum->disp_position,
                     'caption' => \ForkBB\__('Position label'),
                 ];
                 $disabled = (bool) $forum->subforums;
                 $fieldset[] = [
-                    'class'       => ['delete', 'inline'],
+                    'class'    => ['delete', 'inline'],
                     'type'     => 'btn',
                     'value'    => '❌',
-                    'caption'    => \ForkBB\__('Delete'),
+                    'caption'  => \ForkBB\__('Delete'),
                     'link'     => $disabled ? '#' : $this->c->Router->link('AdminForumsDelete', ['id' => $forum->id]),
                     'disabled' => $disabled,
                 ];
@@ -262,12 +262,12 @@ class Forums extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'delete'  => [
+                'delete' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Delete forum'),
                     'accesskey' => 'd',
                 ],
-                'cancel'  => [
+                'cancel' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Cancel'),
                 ],
@@ -277,7 +277,7 @@ class Forums extends Admin
         $form['sets'][] = [
             'fields' => [
                 'confirm' => [
-                    'caption'   => \ForkBB\__('Confirm delete'),
+                    'caption' => \ForkBB\__('Confirm delete'),
                     'type'    => 'checkbox',
                     'label'   => \ForkBB\__('I want to delete forum %s', $forum->forum_name),
                     'value'   => '1',
@@ -397,12 +397,12 @@ class Forums extends Admin
                 return $this->c->Redirect->page('AdminForums')->message($message);
             }
 
-            $this->fIswev  = $v->getErrors();
+            $this->fIswev = $v->getErrors();
         }
 
-        $this->nameTpl   = 'admin/form';
-        $this->aIndex    = 'forums';
-        $this->form      = $this->viewForm($forum, $marker, $args);
+        $this->nameTpl = 'admin/form';
+        $this->aIndex  = 'forums';
+        $this->form    = $this->viewForm($forum, $marker, $args);
 
         return $this;
     }
@@ -447,19 +447,19 @@ class Forums extends Admin
                     'type'      => 'text',
                     'maxlength' => 80,
                     'value'     => $forum->forum_name,
-                    'caption'     => \ForkBB\__('Forum name label'),
+                    'caption'   => \ForkBB\__('Forum name label'),
                     'required'  => true,
                 ],
                 'forum_desc' => [
-                    'type'      => 'textarea',
-                    'value'     => $forum->forum_desc,
-                    'caption'     => \ForkBB\__('Forum description label'),
+                    'type'    => 'textarea',
+                    'value'   => $forum->forum_desc,
+                    'caption' => \ForkBB\__('Forum description label'),
                 ],
                 'parent' => [
                     'type'     => 'select',
                     'options'  => $this->listForOptions,
                     'value'    => $forum->parent_forum_id ? $forum->parent_forum_id : -$forum->cat_id,
-                    'caption'    => \ForkBB\__('Parent label'),
+                    'caption'  => \ForkBB\__('Parent label'),
                     'info'     => \ForkBB\__('Parent help'),
                     'required' => true,
                 ],
@@ -471,13 +471,13 @@ class Forums extends Admin
                         2 => \ForkBB\__('Subject option'),
                     ],
                     'value'   => $forum->sort_by,
-                    'caption'   => \ForkBB\__('Sort by label'),
+                    'caption' => \ForkBB\__('Sort by label'),
                 ],
                 'redirect_url' => [
                     'type'      => 'text',
                     'maxlength' => 255,
                     'value'     => $forum->redirect_url,
-                    'caption'     => \ForkBB\__('Redirect label'),
+                    'caption'   => \ForkBB\__('Redirect label'),
                     'info'      => \ForkBB\__('Redirect help'),
                     'disabled'  => $forum->num_topics || $forum->subforums ? true : null,
                 ],
@@ -502,7 +502,7 @@ class Forums extends Admin
                 'class'    => $group->def_read_forum ? $aOn : $aOff,
                 'type'     => 'checkbox',
                 'value'    => '1',
-                'caption'    => \ForkBB\__('Read forum label'),
+                'caption'  => \ForkBB\__('Read forum label'),
                 'label'    => \ForkBB\__('<span></span>'),
                 'checked'  => $group->set_read_forum,
                 'disabled' => $group->dis_read_forum,
@@ -511,7 +511,7 @@ class Forums extends Admin
                 'class'    => $group->def_post_replies ? $aOn : $aOff,
                 'type'     => 'checkbox',
                 'value'    => '1',
-                'caption'    => \ForkBB\__('Post replies label'),
+                'caption'  => \ForkBB\__('Post replies label'),
                 'label'    => \ForkBB\__('<span></span>'),
                 'checked'  => $group->set_post_replies,
                 'disabled' => $group->dis_post_replies,
@@ -520,7 +520,7 @@ class Forums extends Admin
                 'class'    => $group->def_post_topics ? $aOn : $aOff,
                 'type'     => 'checkbox',
                 'value'    => '1',
-                'caption'    => \ForkBB\__('Post topics label'),
+                'caption'  => \ForkBB\__('Post topics label'),
                 'label'    => \ForkBB\__('<span></span>'),
                 'checked'  => $group->set_post_topics,
                 'disabled' => $group->dis_post_topics,

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

@@ -62,14 +62,14 @@ class Groups extends Admin
                         'type'      => 'select',
                         'options'   => $this->groupsNew,
                         'value'     => $this->c->config->o_default_user_group,
-                        'caption'     => \ForkBB\__('New group label'),
+                        'caption'   => \ForkBB\__('New group label'),
                         'info'      => \ForkBB\__('New group help'),
 #                       'autofocus' => true,
                     ],
                 ],
             ]],
             'btns'   => [
-                'submit'  => [
+                'submit' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Add'),
                     'accesskey' => 'a',
@@ -87,7 +87,7 @@ class Groups extends Admin
                         'type'    => 'select',
                         'options' => $this->groupsDefault,
                         'value'   => $this->c->config->o_default_user_group,
-                        'caption'   => \ForkBB\__('Default group label'),
+                        'caption' => \ForkBB\__('Default group label'),
                         'info'    => \ForkBB\__('Default group help'),
                     ],
                 ],
@@ -347,7 +347,7 @@ class Groups extends Admin
             'type'      => 'text',
             'maxlength' => 50,
             'value'     => $group->g_title,
-            'caption'     => \ForkBB\__('Group title label'),
+            'caption'   => \ForkBB\__('Group title label'),
             'required'  => true,
 #           'autofocus' => true,
         ];
@@ -355,7 +355,7 @@ class Groups extends Admin
             'type'      => 'text',
             'maxlength' => 50,
             'value'     => $group->g_user_title,
-            'caption'     => \ForkBB\__('User title label'),
+            'caption'   => \ForkBB\__('User title label'),
             'info'      => \ForkBB\__('User title help', $group->groupGuest ? \ForkBB\__('Guest') : \ForkBB\__('Member')),
         ];
 
@@ -380,16 +380,16 @@ class Groups extends Admin
                 'type'    => 'select',
                 'options' => $options,
                 'value'   => $group->g_promote_next_group,
-                'caption'   => \ForkBB\__('Promote users label'),
+                'caption' => \ForkBB\__('Promote users label'),
                 'info'    => \ForkBB\__('Promote users help', \ForkBB\__('Disable promotion')),
             ];
             $fieldset['g_promote_min_posts'] = [
-                'type'  => 'number',
-                'min'   => 0,
-                'max'   => 9999999999,
-                'value' => $group->g_promote_min_posts,
+                'type'    => 'number',
+                'min'     => 0,
+                'max'     => 9999999999,
+                'value'   => $group->g_promote_min_posts,
                 'caption' => \ForkBB\__('Number for promotion label'),
-                'info'  => \ForkBB\__('Number for promotion help'),
+                'info'    => \ForkBB\__('Number for promotion help'),
             ];
         }
 
@@ -397,182 +397,182 @@ class Groups extends Admin
 
         if (! $group->groupGuest && $group->g_id != $this->c->config->o_default_user_group) {
             $fieldset['g_moderator'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_moderator,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Mod privileges label'),
-                'info'   => \ForkBB\__('Mod privileges help'),
+                'type'    => 'radio',
+                'value'   => $group->g_moderator,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Mod privileges label'),
+                'info'    => \ForkBB\__('Mod privileges help'),
             ];
             $fieldset['g_mod_edit_users'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_mod_edit_users,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Edit profile label'),
-                'info'   => \ForkBB\__('Edit profile help'),
+                'type'    => 'radio',
+                'value'   => $group->g_mod_edit_users,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Edit profile label'),
+                'info'    => \ForkBB\__('Edit profile help'),
             ];
             $fieldset['g_mod_rename_users'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_mod_rename_users,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Rename users label'),
-                'info'   => \ForkBB\__('Rename users help'),
+                'type'    => 'radio',
+                'value'   => $group->g_mod_rename_users,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Rename users label'),
+                'info'    => \ForkBB\__('Rename users help'),
             ];
             $fieldset['g_mod_change_passwords'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_mod_change_passwords,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Change passwords label'),
-                'info'   => \ForkBB\__('Change passwords help'),
+                'type'    => 'radio',
+                'value'   => $group->g_mod_change_passwords,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Change passwords label'),
+                'info'    => \ForkBB\__('Change passwords help'),
             ];
             $fieldset['g_mod_promote_users'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_mod_promote_users,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Mod promote users label'),
-                'info'   => \ForkBB\__('Mod promote users help'),
+                'type'    => 'radio',
+                'value'   => $group->g_mod_promote_users,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Mod promote users label'),
+                'info'    => \ForkBB\__('Mod promote users help'),
             ];
             $fieldset['g_mod_ban_users'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_mod_ban_users,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Ban users label'),
-                'info'   => \ForkBB\__('Ban users help'),
+                'type'    => 'radio',
+                'value'   => $group->g_mod_ban_users,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Ban users label'),
+                'info'    => \ForkBB\__('Ban users help'),
             ];
         }
 
         $fieldset['g_read_board'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_read_board,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('Read board label'),
-            'info'   => \ForkBB\__('Read board help'),
+            'type'    => 'radio',
+            'value'   => $group->g_read_board,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('Read board label'),
+            'info'    => \ForkBB\__('Read board help'),
         ];
         $fieldset['g_view_users'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_view_users,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('View user info label'),
-            'info'   => \ForkBB\__('View user info help'),
+            'type'    => 'radio',
+            'value'   => $group->g_view_users,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('View user info label'),
+            'info'    => \ForkBB\__('View user info help'),
         ];
         $fieldset['g_post_replies'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_post_replies,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('Post replies label'),
-            'info'   => \ForkBB\__('Post replies help'),
+            'type'    => 'radio',
+            'value'   => $group->g_post_replies,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('Post replies label'),
+            'info'    => \ForkBB\__('Post replies help'),
         ];
         $fieldset['g_post_topics'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_post_topics,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('Post topics label'),
-            'info'   => \ForkBB\__('Post topics help'),
+            'type'    => 'radio',
+            'value'   => $group->g_post_topics,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('Post topics label'),
+            'info'    => \ForkBB\__('Post topics help'),
         ];
 
         if (! $group->groupGuest) {
             $fieldset['g_edit_posts'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_edit_posts,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Edit posts label'),
-                'info'   => \ForkBB\__('Edit posts help'),
+                'type'    => 'radio',
+                'value'   => $group->g_edit_posts,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Edit posts label'),
+                'info'    => \ForkBB\__('Edit posts help'),
             ];
             $fieldset['g_delete_posts'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_delete_posts,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Delete posts label'),
-                'info'   => \ForkBB\__('Delete posts help'),
+                'type'    => 'radio',
+                'value'   => $group->g_delete_posts,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Delete posts label'),
+                'info'    => \ForkBB\__('Delete posts help'),
             ];
             $fieldset['g_delete_topics'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_delete_topics,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Delete topics label'),
-                'info'   => \ForkBB\__('Delete topics help'),
+                'type'    => 'radio',
+                'value'   => $group->g_delete_topics,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Delete topics label'),
+                'info'    => \ForkBB\__('Delete topics help'),
             ];
             $fieldset['g_deledit_interval'] = [
-                'type'  => 'number',
-                'min'   => 0,
-                'max'   => 999999,
-                'value' => $group->g_deledit_interval,
+                'type'    => 'number',
+                'min'     => 0,
+                'max'     => 999999,
+                'value'   => $group->g_deledit_interval,
                 'caption' => \ForkBB\__('Delete-edit interval label'),
-                'info'  => \ForkBB\__('Delete-edit interval help'),
+                'info'    => \ForkBB\__('Delete-edit interval help'),
             ];
             $fieldset['g_set_title'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_set_title,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Set own title label'),
-                'info'   => \ForkBB\__('Set own title help'),
+                'type'    => 'radio',
+                'value'   => $group->g_set_title,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Set own title label'),
+                'info'    => \ForkBB\__('Set own title help'),
             ];
         }
 
         $fieldset['g_post_links'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_post_links,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('Post links label'),
-            'info'   => \ForkBB\__('Post links help'),
+            'type'    => 'radio',
+            'value'   => $group->g_post_links,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('Post links label'),
+            'info'    => \ForkBB\__('Post links help'),
         ];
         $fieldset['g_search'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_search,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('User search label'),
-            'info'   => \ForkBB\__('User search help'),
+            'type'    => 'radio',
+            'value'   => $group->g_search,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('User search label'),
+            'info'    => \ForkBB\__('User search help'),
         ];
         $fieldset['g_search_users'] = [
-            'type'   => 'radio',
-            'value'  => $group->g_search_users,
-            'values' => $yn,
-            'caption'  => \ForkBB\__('User list search label'),
-            'info'   => \ForkBB\__('User list search help'),
+            'type'    => 'radio',
+            'value'   => $group->g_search_users,
+            'values'  => $yn,
+            'caption' => \ForkBB\__('User list search label'),
+            'info'    => \ForkBB\__('User list search help'),
         ];
 
         if (! $group->groupGuest) {
             $fieldset['g_send_email'] = [
-                'type'   => 'radio',
-                'value'  => $group->g_send_email,
-                'values' => $yn,
-                'caption'  => \ForkBB\__('Send e-mails label'),
-                'info'   => \ForkBB\__('Send e-mails help'),
+                'type'    => 'radio',
+                'value'   => $group->g_send_email,
+                'values'  => $yn,
+                'caption' => \ForkBB\__('Send e-mails label'),
+                'info'    => \ForkBB\__('Send e-mails help'),
             ];
         }
 
         $fieldset['g_post_flood'] = [
-            'type'  => 'number',
-            'min'   => 0,
-            'max'   => 999999,
-            'value' => $group->g_post_flood,
+            'type'    => 'number',
+            'min'     => 0,
+            'max'     => 999999,
+            'value'   => $group->g_post_flood,
             'caption' => \ForkBB\__('Post flood label'),
-            'info'  => \ForkBB\__('Post flood help'),
+            'info'    => \ForkBB\__('Post flood help'),
         ];
         $fieldset['g_search_flood'] = [
-            'type'  => 'number',
-            'min'   => 0,
-            'max'   => 999999,
-            'value' => $group->g_search_flood,
+            'type'    => 'number',
+            'min'     => 0,
+            'max'     => 999999,
+            'value'   => $group->g_search_flood,
             'caption' => \ForkBB\__('Search flood label'),
-            'info'  => \ForkBB\__('Search flood help'),
+            'info'    => \ForkBB\__('Search flood help'),
         ];
 
         if (! $group->groupGuest) {
             $fieldset['g_email_flood'] = [
-                'type'  => 'number',
-                'min'   => 0,
-                'max'   => 999999,
-                'value' => $group->g_email_flood,
+                'type'    => 'number',
+                'min'     => 0,
+                'max'     => 999999,
+                'value'   => $group->g_email_flood,
                 'caption' => \ForkBB\__('E-mail flood label'),
-                'info'  => \ForkBB\__('E-mail flood help'),
+                'info'    => \ForkBB\__('E-mail flood help'),
             ];
             $fieldset['g_report_flood'] = [
-                'type'  => 'number',
-                'min'   => 0,
-                'max'   => 999999,
-                'value' => $group->g_report_flood,
+                'type'    => 'number',
+                'min'     => 0,
+                'max'     => 999999,
+                'value'   => $group->g_report_flood,
                 'caption' => \ForkBB\__('Report flood label'),
-                'info'  => \ForkBB\__('Report flood help'),
+                'info'    => \ForkBB\__('Report flood help'),
             ];
         }
 
@@ -664,12 +664,12 @@ class Groups extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'delete'  => [
+                'delete' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Delete group'),
                     'accesskey' => 'd',
                 ],
-                'cancel'  => [
+                'cancel' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Cancel'),
                 ],
@@ -680,11 +680,11 @@ class Groups extends Admin
             $form['sets'][] = [
                 'fields' => [
                     'movegroup' => [
-                        'type'      => 'select',
-                        'options'   => $groups,
-                        'value'     => $this->c->config->o_default_user_group,
-                        'caption'     => \ForkBB\__('Move users label'),
-                        'info'      => \ForkBB\__('Move users info', $group->g_title, $count),
+                        'type'    => 'select',
+                        'options' => $groups,
+                        'value'   => $this->c->config->o_default_user_group,
+                        'caption' => \ForkBB\__('Move users label'),
+                        'info'    => \ForkBB\__('Move users info', $group->g_title, $count),
                     ],
                 ],
             ];
@@ -693,7 +693,7 @@ class Groups extends Admin
         $form['sets'][] = [
             'fields' => [
                 'confirm' => [
-                    'caption'   => \ForkBB\__('Confirm delete'),
+                    'caption' => \ForkBB\__('Confirm delete'),
                     'type'    => 'checkbox',
                     'label'   => \ForkBB\__('I want to delete this group', $group->g_title),
                     'value'   => '1',

+ 24 - 24
app/Models/Pages/Admin/Maintenance.php

@@ -55,26 +55,26 @@ class Maintenance extends Admin
             'hidden' => [
                 'token' => $this->c->Csrf->create('AdminMaintenance'),
             ],
-            'sets' => [
+            'sets'   => [
                 [
                     'fields' => [
                         'o_maintenance' => [
-                            'type'   => 'radio',
-                            'value'  => $config->o_maintenance,
-                            'values' => [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')],
-                            'caption'  => \ForkBB\__('Maintenance mode label'),
-                            'info'   => \ForkBB\__('Maintenance mode help'),
+                            'type'    => 'radio',
+                            'value'   => $config->o_maintenance,
+                            'values'  => [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')],
+                            'caption' => \ForkBB\__('Maintenance mode label'),
+                            'info'    => \ForkBB\__('Maintenance mode help'),
                         ],
                         'o_maintenance_message' => [
-                            'type'      => 'textarea',
-                            'value'     => $config->o_maintenance_message,
-                            'caption'     => \ForkBB\__('Maintenance message label'),
-                            'info'      => \ForkBB\__('Maintenance message help'),
+                            'type'    => 'textarea',
+                            'value'   => $config->o_maintenance_message,
+                            'caption' => \ForkBB\__('Maintenance message label'),
+                            'info'    => \ForkBB\__('Maintenance message help'),
                         ],
                     ],
                 ],
             ],
-            'btns' => [
+            'btns'   => [
                 'submit' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Save changes'),
@@ -88,7 +88,7 @@ class Maintenance extends Admin
             'hidden' => [
                 'token' => $this->c->Csrf->create('AdminMaintenanceRebuild'),
             ],
-            'sets' => [
+            'sets'   => [
                 [
                     'info' => [
                         'info1' => [
@@ -101,26 +101,26 @@ class Maintenance extends Admin
                 [
                     'fields' => [
                         'limit' => [
-                            'type'  => 'number',
-                            'min'   => 1,
-                            'max'   => 9999,
-                            'value' => 100,
+                            'type'    => 'number',
+                            'min'     => 1,
+                            'max'     => 9999,
+                            'value'   => 100,
                             'caption' => \ForkBB\__('Posts per cycle label'),
-                            'info'  => \ForkBB\__('Posts per cycle help'),
+                            'info'    => \ForkBB\__('Posts per cycle help'),
                         ],
                         'start' => [
-                            'type'  => 'number',
-                            'min'   => 1,
-                            'max'   => 9999999999,
-                            'value' => 1,
+                            'type'    => 'number',
+                            'min'     => 1,
+                            'max'     => 9999999999,
+                            'value'   => 1,
                             'caption' => \ForkBB\__('Starting post label'),
-                            'info'  => \ForkBB\__('Starting post help'),
+                            'info'    => \ForkBB\__('Starting post help'),
                         ],
                         'clear' => [
                             'type'    => 'checkbox',
                             'value'   => '1',
                             'checked' => true,
-                            'caption'   => \ForkBB\__('Empty index label'),
+                            'caption' => \ForkBB\__('Empty index label'),
                             'label'   => \ForkBB\__('Empty index help'),
                         ],
                     ],
@@ -135,7 +135,7 @@ class Maintenance extends Admin
                     ],
                 ],
             ],
-            'btns' => [
+            'btns'   => [
                 'rebuild' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Rebuild index'),

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

@@ -215,16 +215,16 @@ class Options extends Admin
                     'type'      => 'text',
                     'maxlength' => 255,
                     'value'     => $config->o_board_title,
-                    'caption'     => \ForkBB\__('Board title label'),
+                    'caption'   => \ForkBB\__('Board title label'),
                     'info'      => \ForkBB\__('Board title help'),
                     'required'  => true,
 #                   'autofocus' => true,
                 ],
                 'o_board_desc' => [
-                    'type'      => 'textarea',
-                    'value'     => $config->o_board_desc,
-                    'caption'     => \ForkBB\__('Board desc label'),
-                    'info'      => \ForkBB\__('Board desc help'),
+                    'type'    => 'textarea',
+                    'value'   => $config->o_board_desc,
+                    'caption' => \ForkBB\__('Board desc label'),
+                    'info'    => \ForkBB\__('Board desc help'),
                 ],
                 'o_default_timezone' => [
                     'type'    => 'select',
@@ -271,28 +271,28 @@ class Options extends Admin
                         '14'    => \ForkBB\__('UTC+14:00'),
                     ],
                     'value'   => $config->o_default_timezone,
-                    'caption'   => \ForkBB\__('Timezone label'),
+                    'caption' => \ForkBB\__('Timezone label'),
                     'info'    => \ForkBB\__('Timezone help'),
                 ],
                 'o_default_dst' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_default_dst,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('DST label'),
-                    'info'   => \ForkBB\__('DST help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_default_dst,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('DST label'),
+                    'info'    => \ForkBB\__('DST help'),
                 ],
                 'o_default_lang' => [
                     'type'    => 'select',
                     'options' => $langs,
                     'value'   => $config->o_default_lang,
-                    'caption'   => \ForkBB\__('Language label'),
+                    'caption' => \ForkBB\__('Language label'),
                     'info'    => \ForkBB\__('Language help'),
                 ],
                 'o_default_style' => [
                     'type'    => 'select',
                     'options' => $styles,
                     'value'   => $config->o_default_style,
-                    'caption'   => \ForkBB\__('Default style label'),
+                    'caption' => \ForkBB\__('Default style label'),
                     'info'    => \ForkBB\__('Default style help'),
                 ],
             ],
@@ -309,7 +309,7 @@ class Options extends Admin
                     'type'      => 'text',
                     'maxlength' => 25,
                     'value'     => $config->o_time_format,
-                    'caption'     => \ForkBB\__('Time format label'),
+                    'caption'   => \ForkBB\__('Time format label'),
                     'info'      => \ForkBB\__('Time format help', $time),
                     'required'  => true,
                 ],
@@ -317,33 +317,33 @@ class Options extends Admin
                     'type'      => 'text',
                     'maxlength' => 25,
                     'value'     => $config->o_date_format,
-                    'caption'     => \ForkBB\__('Date format label'),
+                    'caption'   => \ForkBB\__('Date format label'),
                     'info'      => \ForkBB\__('Date format help', $date),
                     'required'  => true,
                 ],
                 'o_timeout_visit' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 99999,
-                    'value' => $config->o_timeout_visit,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 99999,
+                    'value'   => $config->o_timeout_visit,
                     'caption' => \ForkBB\__('Visit timeout label'),
-                    'info'  => \ForkBB\__('Visit timeout help'),
+                    'info'    => \ForkBB\__('Visit timeout help'),
                 ],
                 'o_timeout_online' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 99999,
-                    'value' => $config->o_timeout_online,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 99999,
+                    'value'   => $config->o_timeout_online,
                     'caption' => \ForkBB\__('Online timeout label'),
-                    'info'  => \ForkBB\__('Online timeout help'),
+                    'info'    => \ForkBB\__('Online timeout help'),
                 ],
                 'o_redirect_delay' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 99999,
-                    'value' => $config->o_redirect_delay,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 99999,
+                    'value'   => $config->o_redirect_delay,
                     'caption' => \ForkBB\__('Redirect time label'),
-                    'info'  => \ForkBB\__('Redirect time help'),
+                    'info'    => \ForkBB\__('Redirect time help'),
                 ],
             ],
         ];
@@ -352,87 +352,87 @@ class Options extends Admin
             'legend' => \ForkBB\__('Display subhead'),
             'fields' => [
                 'o_show_user_info' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_show_user_info,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Info in posts label'),
-                    'info'   => \ForkBB\__('Info in posts help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_show_user_info,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Info in posts label'),
+                    'info'    => \ForkBB\__('Info in posts help'),
                 ],
                 'o_show_post_count' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_show_post_count,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Post count label'),
-                    'info'   => \ForkBB\__('Post count help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_show_post_count,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Post count label'),
+                    'info'    => \ForkBB\__('Post count help'),
                 ],
                 'o_smilies' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_smilies,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Smilies label'),
-                    'info'   => \ForkBB\__('Smilies help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_smilies,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Smilies label'),
+                    'info'    => \ForkBB\__('Smilies help'),
                 ],
                 'o_smilies_sig' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_smilies_sig,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Smilies sigs label'),
-                    'info'   => \ForkBB\__('Smilies sigs help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_smilies_sig,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Smilies sigs label'),
+                    'info'    => \ForkBB\__('Smilies sigs help'),
                 ],
                 'o_make_links' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_make_links,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Clickable links label'),
-                    'info'   => \ForkBB\__('Clickable links help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_make_links,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Clickable links label'),
+                    'info'    => \ForkBB\__('Clickable links help'),
                 ],
                 'o_disp_topics_default' => [
-                    'type'  => 'number',
-                    'min'   => 10,
-                    'max'   => 50,
-                    'value' => $config->o_disp_topics_default,
+                    'type'    => 'number',
+                    'min'     => 10,
+                    'max'     => 50,
+                    'value'   => $config->o_disp_topics_default,
                     'caption' => \ForkBB\__('Topics per page label'),
-                    'info'  => \ForkBB\__('Topics per page help'),
+                    'info'    => \ForkBB\__('Topics per page help'),
                 ],
                 'o_disp_posts_default' => [
-                    'type'  => 'number',
-                    'min'   => 10,
-                    'max'   => 50,
-                    'value' => $config->o_disp_posts_default,
+                    'type'    => 'number',
+                    'min'     => 10,
+                    'max'     => 50,
+                    'value'   => $config->o_disp_posts_default,
                     'caption' => \ForkBB\__('Posts per page label'),
-                    'info'  => \ForkBB\__('Posts per page help'),
+                    'info'    => \ForkBB\__('Posts per page help'),
                 ],
                 'o_disp_users' => [
-                    'type'  => 'number',
-                    'min'   => 10,
-                    'max'   => 50,
-                    'value' => $config->o_disp_users,
+                    'type'    => 'number',
+                    'min'     => 10,
+                    'max'     => 50,
+                    'value'   => $config->o_disp_users,
                     'caption' => \ForkBB\__('Users per page label'),
-                    'info'  => \ForkBB\__('Users per page help'),
+                    'info'    => \ForkBB\__('Users per page help'),
                 ],
                 'o_topic_review' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 50,
-                    'value' => $config->o_topic_review,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 50,
+                    'value'   => $config->o_topic_review,
                     'caption' => \ForkBB\__('Topic review label'),
-                    'info'  => \ForkBB\__('Topic review help'),
+                    'info'    => \ForkBB\__('Topic review help'),
                 ],
                 'o_indent_num_spaces' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 99,
-                    'value' => $config->o_indent_num_spaces,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 99,
+                    'value'   => $config->o_indent_num_spaces,
                     'caption' => \ForkBB\__('Indent label'),
-                    'info'  => \ForkBB\__('Indent help'),
+                    'info'    => \ForkBB\__('Indent help'),
                 ],
                 'o_quote_depth' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 9,
-                    'value' => $config->o_quote_depth,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 9,
+                    'value'   => $config->o_quote_depth,
                     'caption' => \ForkBB\__('Quote depth label'),
-                    'info'  => \ForkBB\__('Quote depth help'),
+                    'info'    => \ForkBB\__('Quote depth help'),
                 ],
             ],
         ];
@@ -441,66 +441,66 @@ class Options extends Admin
             'legend' => \ForkBB\__('Features subhead'),
             'fields' => [
                 'o_quickpost' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_quickpost,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Quick post label'),
-                    'info'   => \ForkBB\__('Quick post help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_quickpost,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Quick post label'),
+                    'info'    => \ForkBB\__('Quick post help'),
                 ],
                 'o_users_online' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_users_online,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Users online label'),
-                    'info'   => \ForkBB\__('Users online help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_users_online,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Users online label'),
+                    'info'    => \ForkBB\__('Users online help'),
                 ],
                 'o_signatures' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_signatures,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Signatures label'),
-                    'info'   => \ForkBB\__('Signatures help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_signatures,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Signatures label'),
+                    'info'    => \ForkBB\__('Signatures help'),
                 ],
                 'o_show_dot' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_show_dot,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('User has posted label'),
-                    'info'   => \ForkBB\__('User has posted help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_show_dot,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('User has posted label'),
+                    'info'    => \ForkBB\__('User has posted help'),
                 ],
                 'o_topic_views' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_topic_views,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Topic views label'),
-                    'info'   => \ForkBB\__('Topic views help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_topic_views,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Topic views label'),
+                    'info'    => \ForkBB\__('Topic views help'),
                 ],
                 'o_quickjump' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_quickjump,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Quick jump label'),
-                    'info'   => \ForkBB\__('Quick jump help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_quickjump,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Quick jump label'),
+                    'info'    => \ForkBB\__('Quick jump help'),
                 ],
                 'o_gzip' => [ //????
-                    'type'   => 'radio',
-                    'value'  => $config->o_gzip,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('GZip label'),
-                    'info'   => \ForkBB\__('GZip help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_gzip,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('GZip label'),
+                    'info'    => \ForkBB\__('GZip help'),
                 ],
                 'o_search_all_forums' => [ //????
-                    'type'   => 'radio',
-                    'value'  => $config->o_search_all_forums,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Search all label'),
-                    'info'   => \ForkBB\__('Search all help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_search_all_forums,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Search all label'),
+                    'info'    => \ForkBB\__('Search all help'),
                 ],
                 'o_additional_navlinks' => [
-                    'type'      => 'textarea',
-                    'value'     => $config->o_additional_navlinks,
-                    'caption'     => \ForkBB\__('Menu items label'),
-                    'info'      => \ForkBB\__('Menu items help'),
+                    'type'    => 'textarea',
+                    'value'   => $config->o_additional_navlinks,
+                    'caption' => \ForkBB\__('Menu items label'),
+                    'info'    => \ForkBB\__('Menu items help'),
                 ],
 
             ],
@@ -510,15 +510,15 @@ class Options extends Admin
             'legend' => \ForkBB\__('Feed subhead'),
             'fields' => [
                 'o_feed_type' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_feed_typet,
-                    'values' => [
+                    'type'    => 'radio',
+                    'value'   => $config->o_feed_typet,
+                    'values'  => [
                         0 => \ForkBB\__('No feeds'),
                         1 => \ForkBB\__('RSS'),
                         2 => \ForkBB\__('Atom'),
                     ],
-                    'caption'  => \ForkBB\__('Default feed label'),
-                    'info'   => \ForkBB\__('Default feed help'),
+                    'caption' => \ForkBB\__('Default feed label'),
+                    'info'    => \ForkBB\__('Default feed help'),
                 ],
                 'o_feed_ttl' => [
                     'type'    => 'select',
@@ -530,7 +530,7 @@ class Options extends Admin
                         60 => \ForkBB\__('%d Minutes', 60),
                     ],
                     'value'   => $config->o_feed_ttl,
-                    'caption'   => \ForkBB\__('Feed TTL label'),
+                    'caption' => \ForkBB\__('Feed TTL label'),
                     'info'    => \ForkBB\__('Feed TTL help'),
                 ],
 
@@ -541,21 +541,21 @@ class Options extends Admin
             'legend' => \ForkBB\__('Reports subhead'),
             'fields' => [
                 'o_report_method' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_report_method,
-                    'values' => [
+                    'type'    => 'radio',
+                    'value'   => $config->o_report_method,
+                    'values'  => [
                         0 => \ForkBB\__('Internal'),
                         1 => \ForkBB\__('By e-mail'),
                         2 => \ForkBB\__('Both'),
                     ],
-                    'caption'  => \ForkBB\__('Reporting method label'),
-                    'info'   => \ForkBB\__('Reporting method help'),
+                    'caption' => \ForkBB\__('Reporting method label'),
+                    'info'    => \ForkBB\__('Reporting method help'),
                 ],
                 'o_mailing_list' => [
-                    'type'      => 'textarea',
-                    'value'     => $config->o_mailing_list,
-                    'caption'     => \ForkBB\__('Mailing list label'),
-                    'info'      => \ForkBB\__('Mailing list help'),
+                    'type'    => 'textarea',
+                    'value'   => $config->o_mailing_list,
+                    'caption' => \ForkBB\__('Mailing list label'),
+                    'info'    => \ForkBB\__('Mailing list help'),
                 ],
             ],
         ];
@@ -564,43 +564,43 @@ class Options extends Admin
             'legend' => \ForkBB\__('Avatars subhead'),
             'fields' => [
                 'o_avatars' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_avatars,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Use avatars label'),
-                    'info'   => \ForkBB\__('Use avatars help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_avatars,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Use avatars label'),
+                    'info'    => \ForkBB\__('Use avatars help'),
                 ],
                 'o_avatars_dir' => [ //????
                     'type'      => 'text',
                     'maxlength' => 255,
                     'value'     => $config->o_avatars_dir,
-                    'caption'     => \ForkBB\__('Upload directory label'),
+                    'caption'   => \ForkBB\__('Upload directory label'),
                     'info'      => \ForkBB\__('Upload directory help'),
                     'required'  => true,
                 ],
                 'o_avatars_width' => [
-                    'type'  => 'number',
-                    'min'   => 50,
-                    'max'   => 999,
-                    'value' => $config->o_avatars_width,
+                    'type'    => 'number',
+                    'min'     => 50,
+                    'max'     => 999,
+                    'value'   => $config->o_avatars_width,
                     'caption' => \ForkBB\__('Max width label'),
-                    'info'  => \ForkBB\__('Max width help'),
+                    'info'    => \ForkBB\__('Max width help'),
                 ],
                 'o_avatars_height' => [
-                    'type'  => 'number',
-                    'min'   => 50,
-                    'max'   => 999,
-                    'value' => $config->o_avatars_height,
+                    'type'    => 'number',
+                    'min'     => 50,
+                    'max'     => 999,
+                    'value'   => $config->o_avatars_height,
                     'caption' => \ForkBB\__('Max height label'),
-                    'info'  => \ForkBB\__('Max height help'),
+                    'info'    => \ForkBB\__('Max height help'),
                 ],
                 'o_avatars_size' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 9999999,
-                    'value' => $config->o_avatars_size,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 9999999,
+                    'value'   => $config->o_avatars_size,
                     'caption' => \ForkBB\__('Max size label'),
-                    'info'  => \ForkBB\__('Max size help'),
+                    'info'    => \ForkBB\__('Max size help'),
                 ],
             ],
         ];
@@ -612,7 +612,7 @@ class Options extends Admin
                     'type'      => 'text',
                     'maxlength' => 80,
                     'value'     => $config->o_admin_email,
-                    'caption'     => \ForkBB\__('Admin e-mail label'),
+                    'caption'   => \ForkBB\__('Admin e-mail label'),
                     'info'      => \ForkBB\__('Admin e-mail help'),
                     'required'  => true,
                 ],
@@ -620,57 +620,57 @@ class Options extends Admin
                     'type'      => 'text',
                     'maxlength' => 80,
                     'value'     => $config->o_webmaster_email,
-                    'caption'     => \ForkBB\__('Webmaster e-mail label'),
+                    'caption'   => \ForkBB\__('Webmaster e-mail label'),
                     'info'      => \ForkBB\__('Webmaster e-mail help'),
                     'required'  => true,
                 ],
                 'o_forum_subscriptions' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_forum_subscriptions,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Forum subscriptions label'),
-                    'info'   => \ForkBB\__('Forum subscriptions help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_forum_subscriptions,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Forum subscriptions label'),
+                    'info'    => \ForkBB\__('Forum subscriptions help'),
                 ],
                 'o_topic_subscriptions' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_topic_subscriptions,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Topic subscriptions label'),
-                    'info'   => \ForkBB\__('Topic subscriptions help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_topic_subscriptions,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Topic subscriptions label'),
+                    'info'    => \ForkBB\__('Topic subscriptions help'),
                 ],
                 'o_smtp_host' => [
                     'type'      => 'text',
                     'maxlength' => 255,
                     'value'     => $config->o_smtp_host,
-                    'caption'     => \ForkBB\__('SMTP address label'),
+                    'caption'   => \ForkBB\__('SMTP address label'),
                     'info'      => \ForkBB\__('SMTP address help'),
                 ],
                 'o_smtp_user' => [
                     'type'      => 'text',
                     'maxlength' => 255,
                     'value'     => $config->o_smtp_user,
-                    'caption'     => \ForkBB\__('SMTP username label'),
+                    'caption'   => \ForkBB\__('SMTP username label'),
                     'info'      => \ForkBB\__('SMTP username help'),
                 ],
                 'o_smtp_pass' => [
                     'type'      => 'password',
                     'maxlength' => 255,
                     'value'     => $config->o_smtp_pass ? '          ' : null,
-                    'caption'     => \ForkBB\__('SMTP password label'),
+                    'caption'   => \ForkBB\__('SMTP password label'),
                     'info'      => \ForkBB\__('SMTP password help'),
                 ],
                 'changeSmtpPassword' => [
-                    'type'  => 'checkbox',
-                    'value' => '1',
+                    'type'    => 'checkbox',
+                    'value'   => '1',
                     'caption' => '',
-                    'label' => \ForkBB\__('SMTP change password help'),
+                    'label'   => \ForkBB\__('SMTP change password help'),
                 ],
                 'o_smtp_ssl' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_smtp_ssl,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('SMTP SSL label'),
-                    'info'   => \ForkBB\__('SMTP SSL help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_smtp_ssl,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('SMTP SSL label'),
+                    'info'    => \ForkBB\__('SMTP SSL help'),
                 ],
             ],
         ];
@@ -679,50 +679,50 @@ class Options extends Admin
             'legend' => \ForkBB\__('Registration subhead'),
             'fields' => [
                 'o_regs_allow' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_regs_allow,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Allow new label'),
-                    'info'   => \ForkBB\__('Allow new help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_regs_allow,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Allow new label'),
+                    'info'    => \ForkBB\__('Allow new help'),
                 ],
                 'o_regs_verify' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_regs_verify,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Verify label'),
-                    'info'   => \ForkBB\__('Verify help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_regs_verify,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Verify label'),
+                    'info'    => \ForkBB\__('Verify help'),
                 ],
                 'o_regs_report' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_regs_report,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Report new label'),
-                    'info'   => \ForkBB\__('Report new help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_regs_report,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Report new label'),
+                    'info'    => \ForkBB\__('Report new help'),
                 ],
                 'o_rules' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_rules,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Use rules label'),
-                    'info'   => \ForkBB\__('Use rules help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_rules,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Use rules label'),
+                    'info'    => \ForkBB\__('Use rules help'),
                 ],
                 'o_rules_message' => [
-                    'type'      => 'textarea',
-                    'value'     => $config->o_rules_message,
-                    'caption'     => \ForkBB\__('Rules label'),
-                    'info'      => \ForkBB\__('Rules help'),
+                    'type'    => 'textarea',
+                    'value'   => $config->o_rules_message,
+                    'caption' => \ForkBB\__('Rules label'),
+                    'info'    => \ForkBB\__('Rules help'),
                 ],
                 'o_default_email_setting' => [
-                    'class'  => 'block',
-                    'type'   => 'radio',
-                    'value'  => $config->o_default_email_setting,
-                    'values' => [
+                    'class'   => 'block',
+                    'type'    => 'radio',
+                    'value'   => $config->o_default_email_setting,
+                    'values'  => [
                         0 => \ForkBB\__('Display e-mail label'),
                         1 => \ForkBB\__('Hide allow form label'),
                         2 => \ForkBB\__('Hide both label'),
                     ],
-                    'caption'  => \ForkBB\__('E-mail default label'),
-                    'info'   => \ForkBB\__('E-mail default help'),
+                    'caption' => \ForkBB\__('E-mail default label'),
+                    'info'    => \ForkBB\__('E-mail default help'),
                 ],
             ],
         ];
@@ -731,17 +731,17 @@ class Options extends Admin
             'legend' => \ForkBB\__('Announcement subhead'),
             'fields' => [
                 'o_announcement' => [
-                    'type'   => 'radio',
-                    'value'  => $config->o_announcement,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Display announcement label'),
-                    'info'   => \ForkBB\__('Display announcement help'),
+                    'type'    => 'radio',
+                    'value'   => $config->o_announcement,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Display announcement label'),
+                    'info'    => \ForkBB\__('Display announcement help'),
                 ],
                 'o_announcement_message' => [
-                    'type'      => 'textarea',
-                    'value'     => $config->o_announcement_message,
-                    'caption'     => \ForkBB\__('Announcement message label'),
-                    'info'      => \ForkBB\__('Announcement message help'),
+                    'type'    => 'textarea',
+                    'value'   => $config->o_announcement_message,
+                    'caption' => \ForkBB\__('Announcement message label'),
+                    'info'    => \ForkBB\__('Announcement message help'),
                 ],
 
             ],

+ 52 - 52
app/Models/Pages/Admin/Permissions.php

@@ -86,7 +86,7 @@ class Permissions extends Admin
             ],
             'sets'   => [],
             'btns'   => [
-                'save'  => [
+                'save' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Save changes'),
                     'accesskey' => 's',
@@ -94,45 +94,45 @@ class Permissions extends Admin
             ],
         ];
 
-        $yn     = [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')];
+        $yn = [1 => \ForkBB\__('Yes'), 0 => \ForkBB\__('No')];
 
         $form['sets'][] = [
             'legend' => \ForkBB\__('Posting subhead'),
             'fields' => [
                 'p_message_bbcode' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_message_bbcode,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('BBCode label'),
-                    'info'   => \ForkBB\__('BBCode help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_message_bbcode,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('BBCode label'),
+                    'info'    => \ForkBB\__('BBCode help'),
                 ],
                 'p_message_img_tag' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_message_img_tag,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Image tag label'),
-                    'info'   => \ForkBB\__('Image tag help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_message_img_tag,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Image tag label'),
+                    'info'    => \ForkBB\__('Image tag help'),
                 ],
                 'p_message_all_caps' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_message_all_caps,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('All caps message label'),
-                    'info'   => \ForkBB\__('All caps message help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_message_all_caps,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('All caps message label'),
+                    'info'    => \ForkBB\__('All caps message help'),
                 ],
                 'p_subject_all_caps' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_subject_all_caps,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('All caps subject label'),
-                    'info'   => \ForkBB\__('All caps subject help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_subject_all_caps,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('All caps subject label'),
+                    'info'    => \ForkBB\__('All caps subject help'),
                 ],
                 'p_force_guest_email' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_force_guest_email,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Require e-mail label'),
-                    'info'   => \ForkBB\__('Require e-mail help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_force_guest_email,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Require e-mail label'),
+                    'info'    => \ForkBB\__('Require e-mail help'),
                 ],
             ],
         ];
@@ -141,41 +141,41 @@ class Permissions extends Admin
             'legend' => \ForkBB\__('Signatures subhead'),
             'fields' => [
                 'p_sig_bbcode' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_sig_bbcode,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('BBCode sigs label'),
-                    'info'   => \ForkBB\__('BBCode sigs help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_sig_bbcode,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('BBCode sigs label'),
+                    'info'    => \ForkBB\__('BBCode sigs help'),
                 ],
                 'p_sig_img_tag' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_sig_img_tag,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('Image tag sigs label'),
-                    'info'   => \ForkBB\__('Image tag sigs help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_sig_img_tag,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('Image tag sigs label'),
+                    'info'    => \ForkBB\__('Image tag sigs help'),
                 ],
                 'p_sig_all_caps' => [
-                    'type'   => 'radio',
-                    'value'  => $config->p_sig_all_caps,
-                    'values' => $yn,
-                    'caption'  => \ForkBB\__('All caps sigs label'),
-                    'info'   => \ForkBB\__('All caps sigs help'),
+                    'type'    => 'radio',
+                    'value'   => $config->p_sig_all_caps,
+                    'values'  => $yn,
+                    'caption' => \ForkBB\__('All caps sigs label'),
+                    'info'    => \ForkBB\__('All caps sigs help'),
                 ],
                 'p_sig_length' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 16000,
-                    'value' => $config->p_sig_length,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 16000,
+                    'value'   => $config->p_sig_length,
                     'caption' => \ForkBB\__('Max sig length label'),
-                    'info'  => \ForkBB\__('Max sig length help'),
+                    'info'    => \ForkBB\__('Max sig length help'),
                 ],
                 'p_sig_lines' => [
-                    'type'  => 'number',
-                    'min'   => 0,
-                    'max'   => 100,
-                    'value' => $config->p_sig_lines,
+                    'type'    => 'number',
+                    'min'     => 0,
+                    'max'     => 100,
+                    'value'   => $config->p_sig_lines,
                     'caption' => \ForkBB\__('Max sig lines label'),
-                    'info'  => \ForkBB\__('Max sig lines help'),
+                    'info'    => \ForkBB\__('Max sig lines help'),
                 ],
 
             ],

+ 37 - 37
app/Models/Pages/Install.php

@@ -185,7 +185,7 @@ class Install extends Page
                                 'type'    => 'select',
                                 'options' => \array_combine($langs, $langs),
                                 'value'   => $this->user->language,
-                                'caption'   => \ForkBB\__('Install language'),
+                                'caption' => \ForkBB\__('Install language'),
                                 'info'    => \ForkBB\__('Choose install language info'),
                             ],
                         ],
@@ -193,8 +193,8 @@ class Install extends Page
                 ],
                 'btns'   => [
                     'changelang'  => [
-                        'type'      => 'submit',
-                        'value'     => \ForkBB\__('Change language'),
+                        'type'  => 'submit',
+                        'value' => \ForkBB\__('Change language'),
                     ],
                 ],
             ];
@@ -226,40 +226,40 @@ class Install extends Page
                             'type'     => 'select',
                             'options'  => $this->dbTypes,
                             'value'    => $v ? $v->dbtype : 'mysql_innodb',
-                            'caption'    => \ForkBB\__('Database type'),
+                            'caption'  => \ForkBB\__('Database type'),
                             'info'     => \ForkBB\__('Info 2'),
                             'required' => true,
                         ],
                         'dbhost' => [
-                            'type'      => 'text',
-                            'value'     => $v ? $v->dbhost : 'localhost',
-                            'caption'     => \ForkBB\__('Database server hostname'),
-                            'info'      => \ForkBB\__('Info 3'),
-                            'required'  => true,
+                            'type'     => 'text',
+                            'value'    => $v ? $v->dbhost : 'localhost',
+                            'caption'  => \ForkBB\__('Database server hostname'),
+                            'info'     => \ForkBB\__('Info 3'),
+                            'required' => true,
                         ],
                         'dbname' => [
-                            'type'      => 'text',
-                            'value'     => $v ? $v->dbname : '',
-                            'caption'     => \ForkBB\__('Database name'),
-                            'info'      => \ForkBB\__('Info 4'),
-                            'required'  => true,
+                            'type'     => 'text',
+                            'value'    => $v ? $v->dbname : '',
+                            'caption'  => \ForkBB\__('Database name'),
+                            'info'     => \ForkBB\__('Info 4'),
+                            'required' => true,
                         ],
                         'dbuser' => [
-                            'type'      => 'text',
-                            'value'     => $v ? $v->dbuser : '',
-                            'caption'     => \ForkBB\__('Database username'),
+                            'type'    => 'text',
+                            'value'   => $v ? $v->dbuser : '',
+                            'caption' => \ForkBB\__('Database username'),
                         ],
                         'dbpass' => [
-                            'type'      => 'password',
-                            'value'     => '',
-                            'caption'     => \ForkBB\__('Database password'),
-                            'info'      => \ForkBB\__('Info 5'),
+                            'type'    => 'password',
+                            'value'   => '',
+                            'caption' => \ForkBB\__('Database password'),
+                            'info'    => \ForkBB\__('Info 5'),
                         ],
                         'dbprefix' => [
                             'type'      => 'text',
                             'maxlength' => 40,
                             'value'     => $v ? $v->dbprefix : '',
-                            'caption'     => \ForkBB\__('Table prefix'),
+                            'caption'   => \ForkBB\__('Table prefix'),
                             'info'      => \ForkBB\__('Info 6'),
                         ],
                     ],
@@ -284,24 +284,24 @@ class Install extends Page
                             'maxlength' => 25,
                             'pattern'   => '^.{2,25}$',
                             'value'     => $v ? $v->username : '',
-                            'caption'     => \ForkBB\__('Administrator username'),
+                            'caption'   => \ForkBB\__('Administrator username'),
                             'info'      => \ForkBB\__('Info 8'),
                             'required'  => true,
                         ],
                         'password' => [
-                            'type'      => 'password',
-                            'pattern'   => '^.{16,}$',
-                            'value'     => '',
-                            'caption'     => \ForkBB\__('Administrator passphrase'),
-                            'info'      => \ForkBB\__('Info 9'),
-                            'required'  => true,
+                            'type'     => 'password',
+                            'pattern'  => '^.{16,}$',
+                            'value'    => '',
+                            'caption'  => \ForkBB\__('Administrator passphrase'),
+                            'info'     => \ForkBB\__('Info 9'),
+                            'required' => true,
                         ],
                         'email' => [
                             'type'      => 'text',
                             'maxlength' => 80,
                             'pattern'   => '.+@.+',
                             'value'     => $v ? $v->email : '',
-                            'caption'     => \ForkBB\__('Administrator email'),
+                            'caption'   => \ForkBB\__('Administrator email'),
                             'info'      => \ForkBB\__('Info 10'),
                             'required'  => true,
                         ],
@@ -327,34 +327,34 @@ class Install extends Page
                             'type'      => 'text',
                             'maxlength' => 255,
                             'value'     => $v ? $v->title : \ForkBB\__('My ForkBB Forum'),
-                            'caption'     => \ForkBB\__('Board title'),
+                            'caption'   => \ForkBB\__('Board title'),
                             'required'  => true,
                         ],
                         'descr' => [
                             'type'      => 'text',
                             'maxlength' => 16000,
                             'value'     => $v ? $v->descr : \ForkBB\__('Description'),
-                            'caption'     => \ForkBB\__('Board description'),
+                            'caption'   => \ForkBB\__('Board description'),
                         ],
                         'baseurl' => [
                             'type'      => 'text',
                             'maxlength' => 1024,
                             'value'     => $v ? $v->baseurl : $this->c->BASE_URL,
-                            'caption'     => \ForkBB\__('Base URL'),
+                            'caption'   => \ForkBB\__('Base URL'),
                             'required'  => true,
                         ],
                         'defaultlang' => [
                             'type'      => 'select',
                             'options'   => \array_combine($langs, $langs),
                             'value'     => $v ? $v->defaultlang : $this->user->language,
-                            'caption'     => \ForkBB\__('Default language'),
+                            'caption'   => \ForkBB\__('Default language'),
                             'required'  => true,
                         ],
                         'defaultstyle' => [
                             'type'      => 'select',
                             'options'   => \array_combine($styles, $styles),
                             'value'     => $v ? $v->defaultstyle : $this->user->style,
-                            'caption'     => \ForkBB\__('Default style'),
+                            'caption'   => \ForkBB\__('Default style'),
                             'required'  => true,
                         ],
 
@@ -363,8 +363,8 @@ class Install extends Page
             ],
             'btns'   => [
                 'submit'  => [
-                    'type'      => 'submit',
-                    'value'     => \ForkBB\__('Start install'),
+                    'type'  => 'submit',
+                    'value' => \ForkBB\__('Start install'),
                 ],
             ],
         ];

+ 5 - 5
app/Models/Pages/PostFormTrait.php

@@ -31,7 +31,7 @@ trait PostFormTrait
             ],
             'sets'   => [],
             'btns'   => [
-                'submit'  => [
+                'submit' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Submit'),
                     'accesskey' => 's',
@@ -51,7 +51,7 @@ trait PostFormTrait
                 'class'     => 'w1',
                 'type'      => 'text',
                 'maxlength' => 25,
-                'caption'     => \ForkBB\__('Username'),
+                'caption'   => \ForkBB\__('Username'),
                 'required'  => true,
                 'pattern'   => '^.{2,25}$',
                 'value'     => isset($vars['username']) ? $vars['username'] : null,
@@ -61,7 +61,7 @@ trait PostFormTrait
                 'class'     => 'w2',
                 'type'      => 'text',
                 'maxlength' => 80,
-                'caption'     => \ForkBB\__('Email'),
+                'caption'   => \ForkBB\__('Email'),
                 'required'  => '1' == $this->c->config->p_force_guest_email,
                 'pattern'   => '.+@.+',
                 'value'     => isset($vars['email']) ? $vars['email'] : null,
@@ -73,7 +73,7 @@ trait PostFormTrait
             $fieldset['subject'] = [
                 'type'      => 'text',
                 'maxlength' => 70,
-                'caption'     => \ForkBB\__('Subject'),
+                'caption'   => \ForkBB\__('Subject'),
                 'required'  => true,
                 'value'     => isset($vars['subject']) ? $vars['subject'] : null,
                 'autofocus' => $autofocus,
@@ -83,7 +83,7 @@ trait PostFormTrait
 
         $fieldset['message'] = [
             'type'     => 'textarea',
-            'caption'    => \ForkBB\__('Message'),
+            'caption'  => \ForkBB\__('Message'),
             'required' => true,
             'value'    => isset($vars['message']) ? $vars['message'] : null,
             'bb'       => [

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

@@ -37,7 +37,7 @@ class Profile extends Page
                 ],
                 'sets'   => [],
                 'btns'   => [
-                    'save'  => [
+                    'save' => [
                         'type'      => 'submit',
                         'value'     => \ForkBB\__('Save changes'),
                         'accesskey' => 's',
@@ -50,14 +50,14 @@ class Profile extends Page
 
         $fieldset = [];
         $fieldset[] = [
-            'class'     => 'usertitle',
-            'type'      => 'wrap',
+            'class' => 'usertitle',
+            'type'  => 'wrap',
         ];
         $fieldset['username'] = [
             'id'        => 'username',
             'type'      => 'text',
             'maxlength' => 25,
-            'caption'     => \ForkBB\__('Username'),
+            'caption'   => \ForkBB\__('Username'),
             'required'  => true,
             'pattern'   => '^.{2,25}$',
             'value'     => $curUser->username,
@@ -66,18 +66,18 @@ class Profile extends Page
             'id'        => 'title',
             'type'      => 'text',
             'maxlength' => 50,
-            'caption'     => \ForkBB\__('Title'),
+            'caption'   => \ForkBB\__('Title'),
             'value'     => $isEdit ? $curUser->title : $curUser->title(),
         ];
         $fieldset[] = [
-            'type'      => 'endwrap',
+            'type' => 'endwrap',
         ];
         if ('1' == $this->c->config->o_avatars && $curUser->avatar) {
             $fieldset['avatar'] = [
-                'id'        => 'avatar',
-                'type'      => 'yield',
-                'caption'     => \ForkBB\__('Avatar'),
-                'value'     => 'avatar',
+                'id'      => 'avatar',
+                'type'    => 'yield',
+                'caption' => \ForkBB\__('Avatar'),
+                'value'   => 'avatar',
             ];
         }
         $form['sets'][] = [
@@ -93,21 +93,21 @@ class Profile extends Page
                 'id'        => 'realname',
                 'type'      => 'text',
                 'maxlength' => 40,
-                'caption'     => \ForkBB\__('Realname'),
+                'caption'   => \ForkBB\__('Realname'),
                 'value'     => $isEdit ? $curUser->realname : \ForkBB\cens($curUser->realname),
             ];
         }
         if ($isEdit || $curUser->gender) {
             $fieldset['gender'] = [
-                'id'     => 'gender',
-                'type'   => 'radio',
-                'value'  => $curUser->gender,
-                'values' => [
+                'id'      => 'gender',
+                'type'    => 'radio',
+                'value'   => $curUser->gender,
+                'values'  => [
                     0 => \ForkBB\__('Unknown'),
                     1 => \ForkBB\__('Male'),
                     2 => \ForkBB\__('Female'),
                 ],
-                'caption'  => \ForkBB\__('Gender'),
+                'caption' => \ForkBB\__('Gender'),
             ];
         }
         if ($isEdit || $curUser->location) {
@@ -115,7 +115,7 @@ class Profile extends Page
                 'id'        => 'location',
                 'type'      => 'text',
                 'maxlength' => 40,
-                'caption'     => \ForkBB\__('Location'),
+                'caption'   => \ForkBB\__('Location'),
                 'value'     => $isEdit ? $curUser->location : \ForkBB\cens($curUser->location),
             ];
         }
@@ -124,7 +124,7 @@ class Profile extends Page
                 'id'        => 'website',
                 'type'      => 'text',
                 'maxlength' => 100,
-                'caption'     => \ForkBB\__('Website'),
+                'caption'   => \ForkBB\__('Website'),
                 'value'     => $isEdit ? $curUser->url : \ForkBB\cens($curUser->url),
             ];
         }
@@ -140,17 +140,17 @@ class Profile extends Page
         $fieldset = [];
         if ($isEdit) {
             $fieldset['signature'] = [
-                'id'        => 'signature',
-                'type'      => 'textarea',
-                'value'     => $curUser->signature,
-                'caption'     => \ForkBB\__('Signature'),
+                'id'      => 'signature',
+                'type'    => 'textarea',
+                'value'   => $curUser->signature,
+                'caption' => \ForkBB\__('Signature'),
             ];
         } elseif ($curUser->signature) { //????
             $fieldset['signature'] = [
-                'id'        => 'signature',
-                'type'      => 'yield',
-                'caption'     => \ForkBB\__('Signature'),
-                'value'     => 'signature',
+                'id'      => 'signature',
+                'type'    => 'yield',
+                'caption' => \ForkBB\__('Signature'),
+                'value'   => 'signature',
             ];
         }
         if (! empty($fieldset)) {
@@ -164,49 +164,49 @@ class Profile extends Page
 
         $fieldset = [];
         $fieldset['registered'] = [
-            'id'        => 'registered',
-            'type'      => 'str',
-            'value'     => \ForkBB\dt($curUser->registered, true),
-            'caption'     => \ForkBB\__('Registered info'),
+            'id'      => 'registered',
+            'type'    => 'str',
+            'value'   => \ForkBB\dt($curUser->registered, true),
+            'caption' => \ForkBB\__('Registered info'),
         ];
         $fieldset['lastvisit'] = [
-            'id'        => 'lastvisit',
-            'type'      => 'str',
-            'value'     => \ForkBB\dt($curUser->last_visit, true),
-            'caption'     => \ForkBB\__('Last visit info'),
+            'id'      => 'lastvisit',
+            'type'    => 'str',
+            'value'   => \ForkBB\dt($curUser->last_visit, true),
+            'caption' => \ForkBB\__('Last visit info'),
         ];
         $fieldset['lastpost'] = [
-            'id'        => 'lastpost',
-            'type'      => 'str',
-            'value'     => \ForkBB\dt($curUser->last_post, true),
-            'caption'     => \ForkBB\__('Last post info'),
+            'id'      => 'lastpost',
+            'type'    => 'str',
+            'value'   => \ForkBB\dt($curUser->last_post, true),
+            'caption' => \ForkBB\__('Last post info'),
         ];
         if ($curUser->num_posts) {
             if ('1' == $this->user->g_search && $this->user->showPostCount) {
                 $fieldset['posts'] = [
-                    'id'        => 'posts',
-                    'type'      => 'yield',
-                    'caption'     => \ForkBB\__('Posts info'),
-                    'value'     => 'totalposts',
+                    'id'      => 'posts',
+                    'type'    => 'yield',
+                    'caption' => \ForkBB\__('Posts info'),
+                    'value'   => 'totalposts',
                 ];
                 $fieldset['topics'] = [
-                    'id'        => 'topics',
-                    'type'      => 'yield',
-                    'caption'     => \ForkBB\__('Topics info'),
-                    'value'     => 'totaltopics',
+                    'id'      => 'topics',
+                    'type'    => 'yield',
+                    'caption' => \ForkBB\__('Topics info'),
+                    'value'   => 'totaltopics',
                 ];
             } elseif ($this->user->showPostCount) {
                 $fieldset['posts'] = [
-                    'id'        => 'posts',
-                    'type'      => 'str',
-                    'caption'     => \ForkBB\__('Posts info'),
-                    'value'     => \ForkBB\num($curUser->num_posts),
+                    'id'      => 'posts',
+                    'type'    => 'str',
+                    'caption' => \ForkBB\__('Posts info'),
+                    'value'   => \ForkBB\num($curUser->num_posts),
                 ];
                 $fieldset['topics'] = [
-                    'id'        => 'topics',
-                    'type'      => 'str',
-                    'caption'     => \ForkBB\__('Topics info'),
-                    'value'     => \ForkBB\num($curUser->num_topics),
+                    'id'      => 'topics',
+                    'type'    => 'str',
+                    'caption' => \ForkBB\__('Topics info'),
+                    'value'   => \ForkBB\num($curUser->num_topics),
                 ];
             }
         }
@@ -218,14 +218,14 @@ class Profile extends Page
         ];
 
 
-        $this->fIndex     = $curUser->id === $this->user->id ? 'profile' : 'userlist';
-        $this->nameTpl    = 'profile';
-        $this->onlinePos  = 'profile-' . $curUser->id; // ????
-        $this->canonical  = $curUser->link;
-        $this->title      = \ForkBB\__('%s\'s profile', $curUser->username);
-        $this->crumbs     = $this->crumbs([$curUser->link, $this->title]);
-        $this->form       = $form;
-        $this->curUser    = $curUser;
+        $this->fIndex    = $curUser->id === $this->user->id ? 'profile' : 'userlist';
+        $this->nameTpl   = 'profile';
+        $this->onlinePos = 'profile-' . $curUser->id; // ????
+        $this->canonical = $curUser->link;
+        $this->title     = \ForkBB\__('%s\'s profile', $curUser->username);
+        $this->crumbs    = $this->crumbs([$curUser->link, $this->title]);
+        $this->form      = $form;
+        $this->curUser   = $curUser;
 
         return $this;
     }

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

@@ -131,9 +131,9 @@ class Search extends Page
             'hidden' => [
                 'token' => $this->c->Csrf->create($marker),
             ],
-            'sets' => [],
+            'sets'   => [],
             'btns'   => [
-                'search'  => [
+                'search' => [
                     'type'      => 'submit',
                     'value'     => \ForkBB\__('Search btn'),
                     'accesskey' => 's',
@@ -145,15 +145,15 @@ class Search extends Page
             $form['sets'][] = [
                 'fields' => [
                     [
-                        'type'      => 'info',
-                        'value'     => \ForkBB\__('<a href="%s">Simple search</a>', $this->c->Router->link('Search')),
-                        'html'      => true,
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('<a href="%s">Simple search</a>', $this->c->Router->link('Search')),
+                        'html'  => true,
                     ],
                     'keywords' => [
                         'class'     => 'w2',
                         'type'      => 'text',
                         'maxlength' => 100,
-                        'caption'     => \ForkBB\__('Keyword search'),
+                        'caption'   => \ForkBB\__('Keyword search'),
                         'value'     => $v ? $v->keywords : '',
                         'required'  => true,
                         'autofocus' => true,
@@ -162,13 +162,13 @@ class Search extends Page
                         'class'     => 'w1',
                         'type'      => 'text',
                         'maxlength' => 25,
-                        'caption'     => \ForkBB\__('Author search'),
+                        'caption'   => \ForkBB\__('Author search'),
                         'value'     => $v ? $v->author : '*',
                         'required'  => true,
                     ],
                     [
-                        'type'      => 'info',
-                        'value'     => \ForkBB\__('Search info'),
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('Search info'),
                     ],
                 ],
             ];
@@ -180,7 +180,7 @@ class Search extends Page
                         'type'    => 'multiselect',
                         'options' => $this->listForOptions,
                         'value'   => $v ? \explode('.', $v->forums) : null,
-                        'caption'   => \ForkBB\__('Forum search'),
+                        'caption' => \ForkBB\__('Forum search'),
                         'size'    => \min(\count($this->listForOptions), 10),
                     ],
                     'serch_in' => [
@@ -192,15 +192,15 @@ class Search extends Page
                             2 => \ForkBB\__('Topic only'),
                         ],
                         'value'   => $v ? $v->serch_in : 0,
-                        'caption'   => \ForkBB\__('Search in'),
+                        'caption' => \ForkBB\__('Search in'),
                     ],
                     [
-                        'type'    => 'info',
-                        'value'   => \ForkBB\__('Search in info'),
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('Search in info'),
                     ],
                     [
-                        'type'    => 'info',
-                        'value'   => \ForkBB\__('Search multiple forums info'),
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('Search multiple forums info'),
                     ],
 
                 ],
@@ -218,7 +218,7 @@ class Search extends Page
                             3 => \ForkBB\__('Sort by forum'),
                         ],
                         'value'   => $v ? $v->sort_by : 0,
-                        'caption'   => \ForkBB\__('Sort by'),
+                        'caption' => \ForkBB\__('Sort by'),
                     ],
                     'sort_dir' => [
                         'class'   => 'w4',
@@ -228,7 +228,7 @@ class Search extends Page
                             1 => \ForkBB\__('Ascending'),
                         ],
                         'value'   => $v ? $v->sort_dir : 0,
-                        'caption'   => \ForkBB\__('Sort order'),
+                        'caption' => \ForkBB\__('Sort order'),
                     ],
                     'show_as' => [
                         'class'   => 'w4',
@@ -238,11 +238,11 @@ class Search extends Page
                             1 => \ForkBB\__('Show as topics'),
                         ],
                         'value'   => $v ? $v->show_as : 0,
-                        'caption'   => \ForkBB\__('Show as'),
+                        'caption' => \ForkBB\__('Show as'),
                     ],
                     [
-                        'type'    => 'info',
-                        'value'   => \ForkBB\__('Search results info'),
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('Search results info'),
                     ],
                 ],
 
@@ -251,14 +251,14 @@ class Search extends Page
             $form['sets'][] = [
                 'fields' => [
                     [
-                        'type'      => 'info',
-                        'value'     => \ForkBB\__('<a href="%s">Advanced search</a>', $this->c->Router->link('SearchAdvanced')),
-                        'html'      => true,
+                        'type'  => 'info',
+                        'value' => \ForkBB\__('<a href="%s">Advanced search</a>', $this->c->Router->link('SearchAdvanced')),
+                        'html'  => true,
                     ],
                     'keywords' => [
                         'type'      => 'text',
                         'maxlength' => 100,
-                        'caption'     => \ForkBB\__('Keyword search'),
+                        'caption'   => \ForkBB\__('Keyword search'),
                         'value'     => $v ? $v->keywords : '',
                         'required'  => true,
                         'autofocus' => true,
@@ -267,13 +267,13 @@ class Search extends Page
             ];
         }
 
-        $this->fIndex       = 'search';
-        $this->nameTpl      = 'search';
-        $this->onlinePos    = 'search';
-        $this->canonical    = $this->c->Router->link('Search');
-        $this->robots       = 'noindex';
-        $this->form         = $form;
-        $this->crumbs       = $this->crumbs([$this->c->Router->link('Search'), \ForkBB\__('Search')]);
+        $this->fIndex    = 'search';
+        $this->nameTpl   = 'search';
+        $this->onlinePos = 'search';
+        $this->canonical = $this->c->Router->link('Search');
+        $this->robots    = 'noindex';
+        $this->form      = $form;
+        $this->crumbs    = $this->crumbs([$this->c->Router->link('Search'), \ForkBB\__('Search')]);
 
         return $this;
     }

+ 8 - 8
app/Models/Pages/Userlist.php

@@ -134,7 +134,7 @@ class Userlist extends Page
                 'type'      => 'text',
                 'maxlength' => 25,
                 'value'     => $v->name ?: '*',
-                'caption'     => \ForkBB\__('Username'),
+                'caption'   => \ForkBB\__('Username'),
                 'info'      => \ForkBB\__('User search info'),
                 'required'  => true,
 #               'autofocus' => true,
@@ -149,7 +149,7 @@ class Userlist extends Page
                     return [$group->g_id, $group->g_title];
                 }, $groups),
             'value'   => $v->group,
-            'caption'   => \ForkBB\__('User group'),
+            'caption' => \ForkBB\__('User group'),
         ];
         $fields['sort'] = [
             'class'   => 'w4',
@@ -160,17 +160,17 @@ class Userlist extends Page
                 ['registered', \ForkBB\__('Sort by date')],
             ],
             'value'   => $v->sort,
-            'caption'   => \ForkBB\__('Sort users by'),
+            'caption' => \ForkBB\__('Sort users by'),
         ];
         $fields['dir'] = [
-            'class'  => 'w4',
-            'type'   => 'radio',
-            'value'  => $v->dir ?: 'ASC',
-            'values' => [
+            'class'   => 'w4',
+            'type'    => 'radio',
+            'value'   => $v->dir ?: 'ASC',
+            'values'  => [
                 'ASC'  => \ForkBB\__('Ascending'),
                 'DESC' => \ForkBB\__('Descending'),
             ],
-            'caption'  => \ForkBB\__('User sort order'),
+            'caption' => \ForkBB\__('User sort order'),
         ];
         $form['sets'][] = ['fields' => $fields];