Add strict mode 4
This commit is contained in:
parent
e355b2a42f
commit
8bc21acc9c
25 changed files with 142 additions and 140 deletions
|
@ -16,7 +16,7 @@ class View extends Dirk
|
|||
'views' => $views,
|
||||
'cache' => $cache,
|
||||
'ext' => '.forkbb.php',
|
||||
'echo' => '\\htmlspecialchars(%s, \\ENT_HTML5 | \\ENT_QUOTES | \\ENT_SUBSTITUTE, \'UTF-8\')',
|
||||
'echo' => '\\htmlspecialchars((string) %s, \\ENT_HTML5 | \\ENT_QUOTES | \\ENT_SUBSTITUTE, \'UTF-8\')',
|
||||
'separator' => '/',
|
||||
];
|
||||
$this->compilers[] = 'Transformations';
|
||||
|
@ -54,6 +54,8 @@ class View extends Dirk
|
|||
$perfix = <<<'EOD'
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use function \ForkBB\{__, num, dt, size};
|
||||
|
||||
?>
|
||||
|
|
|
@ -18,8 +18,8 @@ class Info extends Method
|
|||
return null;
|
||||
}
|
||||
|
||||
$this->model->maxNum = $this->c->config->st_max_users;
|
||||
$this->model->maxTime = $this->c->config->st_max_users_time;
|
||||
$this->model->maxNum = (int) $this->c->config->st_max_users;
|
||||
$this->model->maxTime = (int) $this->c->config->st_max_users_time;
|
||||
|
||||
$info = [];
|
||||
if ('1' == $this->c->user->g_view_users) {
|
||||
|
|
|
@ -139,25 +139,25 @@ class Bans extends Admin
|
|||
$fields = [];
|
||||
$fields['username'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Username label'),
|
||||
'value' => $data['username'] ?? null,
|
||||
];
|
||||
$fields['ip'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 40,
|
||||
'maxlength' => '40',
|
||||
'caption' => __('IP label'),
|
||||
'value' => $data['ip'] ?? null,
|
||||
];
|
||||
$fields['email'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __('E-mail label'),
|
||||
'value' => $data['email'] ?? null,
|
||||
];
|
||||
$fields['message'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'caption' => __('Message label'),
|
||||
'value' => $data['message'] ?? null,
|
||||
];
|
||||
|
@ -168,14 +168,14 @@ class Bans extends Admin
|
|||
$fields['expire_1'] = [
|
||||
'class' => 'bstart',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['expire_1'] ?? null,
|
||||
'caption' => __('Expire date label'),
|
||||
];
|
||||
$fields['expire_2'] = [
|
||||
'class' => 'bend',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['expire_2'] ?? null,
|
||||
];
|
||||
$fields[] = [
|
||||
|
@ -254,21 +254,21 @@ class Bans extends Admin
|
|||
$fields = [];
|
||||
$fields['username'] = [
|
||||
'type' => $this->banCount < 1 ? 'text' : 'str',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Username label'),
|
||||
'info' => $this->banCount < 1 ? __('Username help') : null,
|
||||
'value' => $data['username'] ?? null,
|
||||
];
|
||||
$fields['ip'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'caption' => __('IP label'),
|
||||
'info' => __('IP help'),
|
||||
'value' => $data['ip'] ?? null,
|
||||
];
|
||||
$fields['email'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __('E-mail label'),
|
||||
'info' => __('E-mail help'),
|
||||
'value' => $data['email'] ?? null,
|
||||
|
@ -282,14 +282,14 @@ class Bans extends Admin
|
|||
$fields = [];
|
||||
$fields['message'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'caption' => __('Ban message label'),
|
||||
'info' => __('Ban message help'),
|
||||
'value' => $data['message'] ?? null,
|
||||
];
|
||||
$fields['expire'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'caption' => __('Expire date label'),
|
||||
'info' => __('Expire date help'),
|
||||
'value' => $data['expire'] ?? null,
|
||||
|
|
|
@ -84,7 +84,7 @@ class Categories extends Admin
|
|||
$fields["form[{$key}][cat_name]"] = [
|
||||
'class' => ['name', 'category'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $row['cat_name'],
|
||||
'caption' => __('Category name label'),
|
||||
'required' => true,
|
||||
|
@ -92,8 +92,8 @@ class Categories extends Admin
|
|||
$fields["form[{$key}][disp_position]"] = [
|
||||
'class' => ['position', 'category'],
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9999999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999999',
|
||||
'value' => $row['disp_position'],
|
||||
'caption' => __('Category position label'),
|
||||
];
|
||||
|
@ -122,7 +122,7 @@ class Categories extends Admin
|
|||
'new' => [
|
||||
'class' => 'new',
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __('Add category label'),
|
||||
'info' => __('Add category help', $this->c->Router->link('AdminForums'), __('Forums')),
|
||||
],
|
||||
|
|
|
@ -97,14 +97,14 @@ class Censoring extends Admin
|
|||
$fieldset["form[{$id}][search_for]"] = [
|
||||
'class' => ['censor'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 60,
|
||||
'maxlength' => '60',
|
||||
'value' => $row['search_for'],
|
||||
'caption' => __('Censored word label'),
|
||||
];
|
||||
$fieldset["form[{$id}][replace_with]"] = [
|
||||
'class' => ['censor'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 60,
|
||||
'maxlength' => '60',
|
||||
'value' => $row['replace_with'],
|
||||
'caption' => __('Replacement label'),
|
||||
];
|
||||
|
@ -112,14 +112,14 @@ class Censoring extends Admin
|
|||
$fieldset["form[0][search_for]"] = [
|
||||
'class' => ['censor'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 60,
|
||||
'maxlength' => '60',
|
||||
'value' => '',
|
||||
'caption' => __('Censored word label'),
|
||||
];
|
||||
$fieldset["form[0][replace_with]"] = [
|
||||
'class' => ['censor'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 60,
|
||||
'maxlength' => '60',
|
||||
'value' => '',
|
||||
'caption' => __('Replacement label'),
|
||||
];
|
||||
|
|
|
@ -183,8 +183,8 @@ class Forums extends Admin
|
|||
$fields["form[{$forum->id}][disp_position]"] = [
|
||||
'class' => ['position', 'forum'],
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9999999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999999',
|
||||
'value' => $forum->disp_position,
|
||||
'caption' => __('Position label'),
|
||||
];
|
||||
|
@ -473,7 +473,7 @@ class Forums extends Admin
|
|||
'fields' => [
|
||||
'forum_name' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $forum->forum_name,
|
||||
'caption' => __('Forum name label'),
|
||||
'required' => true,
|
||||
|
@ -503,7 +503,7 @@ class Forums extends Admin
|
|||
],
|
||||
'redirect_url' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $forum->redirect_url,
|
||||
'caption' => __('Redirect label'),
|
||||
'info' => __('Redirect help'),
|
||||
|
|
|
@ -389,7 +389,7 @@ class Groups extends Admin
|
|||
$fieldset = [];
|
||||
$fieldset['g_title'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'maxlength' => '50',
|
||||
'value' => $group->g_title,
|
||||
'caption' => __('Group title label'),
|
||||
'required' => true,
|
||||
|
@ -397,7 +397,7 @@ class Groups extends Admin
|
|||
];
|
||||
$fieldset['g_user_title'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'maxlength' => '50',
|
||||
'value' => $group->g_user_title,
|
||||
'caption' => __('User title label'),
|
||||
'info' => __('User title help', $group->groupGuest ? __('Guest') : __('Member')),
|
||||
|
@ -433,8 +433,8 @@ class Groups extends Admin
|
|||
];
|
||||
$fieldset['g_promote_min_posts'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9999999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999999',
|
||||
'value' => $group->g_promote_min_posts,
|
||||
'caption' => __('Number for promotion label'),
|
||||
'info' => __('Number for promotion help'),
|
||||
|
@ -545,8 +545,8 @@ class Groups extends Admin
|
|||
];
|
||||
$fieldset['g_deledit_interval'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 999999,
|
||||
'min' => '0',
|
||||
'max' => '999999',
|
||||
'value' => $group->g_deledit_interval,
|
||||
'caption' => __('Delete-edit interval label'),
|
||||
'info' => __('Delete-edit interval help'),
|
||||
|
@ -594,16 +594,16 @@ class Groups extends Admin
|
|||
|
||||
$fieldset['g_post_flood'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 999999,
|
||||
'min' => '0',
|
||||
'max' => '999999',
|
||||
'value' => $group->g_post_flood,
|
||||
'caption' => __('Post flood label'),
|
||||
'info' => __('Post flood help'),
|
||||
];
|
||||
$fieldset['g_search_flood'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 999999,
|
||||
'min' => '0',
|
||||
'max' => '999999',
|
||||
'value' => $group->g_search_flood,
|
||||
'caption' => __('Search flood label'),
|
||||
'info' => __('Search flood help'),
|
||||
|
@ -612,16 +612,16 @@ class Groups extends Admin
|
|||
if (! $group->groupGuest) {
|
||||
$fieldset['g_email_flood'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 999999,
|
||||
'min' => '0',
|
||||
'max' => '999999',
|
||||
'value' => $group->g_email_flood,
|
||||
'caption' => __('E-mail flood label'),
|
||||
'info' => __('E-mail flood help'),
|
||||
];
|
||||
$fieldset['g_report_flood'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 999999,
|
||||
'min' => '0',
|
||||
'max' => '999999',
|
||||
'value' => $group->g_report_flood,
|
||||
'caption' => __('Report flood label'),
|
||||
'info' => __('Report flood help'),
|
||||
|
@ -648,16 +648,16 @@ class Groups extends Admin
|
|||
if (! $group->groupGuest) {
|
||||
$fieldset['g_sig_length'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 16000,
|
||||
'min' => '0',
|
||||
'max' => '16000',
|
||||
'value' => $group->g_sig_length,
|
||||
'caption' => __('Max sig length label'),
|
||||
'info' => __('Max sig length help'),
|
||||
];
|
||||
$fieldset['g_sig_lines'] = [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 100,
|
||||
'min' => '0',
|
||||
'max' => '100',
|
||||
'value' => $group->g_sig_lines,
|
||||
'caption' => __('Max sig lines label'),
|
||||
'info' => __('Max sig lines help'),
|
||||
|
|
|
@ -262,7 +262,7 @@ class Install extends Admin
|
|||
],
|
||||
'dbprefix' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 40,
|
||||
'maxlength' => '40',
|
||||
'value' => $v ? $v->dbprefix : '',
|
||||
'caption' => __('Table prefix'),
|
||||
'info' => __('Info 6'),
|
||||
|
@ -287,7 +287,7 @@ class Install extends Admin
|
|||
'fields' => [
|
||||
'username' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'pattern' => '^.{2,25}$',
|
||||
'value' => $v ? $v->username : '',
|
||||
'caption' => __('Administrator username'),
|
||||
|
@ -304,7 +304,7 @@ class Install extends Admin
|
|||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'pattern' => '.+@.+',
|
||||
'value' => $v ? $v->email : '',
|
||||
'caption' => __('Administrator email'),
|
||||
|
@ -331,20 +331,20 @@ class Install extends Admin
|
|||
'fields' => [
|
||||
'title' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $v ? $v->title : __('My ForkBB Forum'),
|
||||
'caption' => __('Board title'),
|
||||
'required' => true,
|
||||
],
|
||||
'descr' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 16000,
|
||||
'maxlength' => '16000',
|
||||
'value' => $v ? $v->descr : __('Description'),
|
||||
'caption' => __('Board description'),
|
||||
],
|
||||
'baseurl' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 1024,
|
||||
'maxlength' => '1024',
|
||||
'value' => $v ? $v->baseurl : $this->c->BASE_URL,
|
||||
'caption' => __('Base URL'),
|
||||
'required' => true,
|
||||
|
|
|
@ -119,17 +119,17 @@ class Maintenance extends Admin
|
|||
'fields' => [
|
||||
'limit' => [
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'max' => 9999,
|
||||
'value' => 100,
|
||||
'min' => '1',
|
||||
'max' => '9999',
|
||||
'value' => '100',
|
||||
'caption' => __('Posts per cycle label'),
|
||||
'info' => __('Posts per cycle help'),
|
||||
],
|
||||
'start' => [
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'max' => 9999999999,
|
||||
'value' => 1,
|
||||
'min' => '1',
|
||||
'max' => '9999999999',
|
||||
'value' => '1',
|
||||
'caption' => __('Starting post label'),
|
||||
'info' => __('Starting post help'),
|
||||
],
|
||||
|
|
|
@ -188,7 +188,7 @@ class Options extends Admin
|
|||
'fields' => [
|
||||
'o_board_title' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $config->o_board_title,
|
||||
'caption' => __('Board title label'),
|
||||
'info' => __('Board title help'),
|
||||
|
@ -280,24 +280,24 @@ class Options extends Admin
|
|||
'fields' => [
|
||||
'o_timeout_visit' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'min' => '0',
|
||||
'max' => '99999',
|
||||
'value' => $config->o_timeout_visit,
|
||||
'caption' => __('Visit timeout label'),
|
||||
'info' => __('Visit timeout help'),
|
||||
],
|
||||
'o_timeout_online' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'min' => '0',
|
||||
'max' => '99999',
|
||||
'value' => $config->o_timeout_online,
|
||||
'caption' => __('Online timeout label'),
|
||||
'info' => __('Online timeout help'),
|
||||
],
|
||||
'o_redirect_delay' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 99999,
|
||||
'min' => '0',
|
||||
'max' => '99999',
|
||||
'value' => $config->o_redirect_delay,
|
||||
'caption' => __('Redirect time label'),
|
||||
'info' => __('Redirect time help'),
|
||||
|
@ -324,32 +324,32 @@ class Options extends Admin
|
|||
],
|
||||
'o_disp_topics_default' => [
|
||||
'type' => 'number',
|
||||
'min' => 10,
|
||||
'max' => 50,
|
||||
'min' => '10',
|
||||
'max' => '50',
|
||||
'value' => $config->o_disp_topics_default,
|
||||
'caption' => __('Topics per page label'),
|
||||
'info' => __('Topics per page help'),
|
||||
],
|
||||
'o_disp_posts_default' => [
|
||||
'type' => 'number',
|
||||
'min' => 10,
|
||||
'max' => 50,
|
||||
'min' => '10',
|
||||
'max' => '50',
|
||||
'value' => $config->o_disp_posts_default,
|
||||
'caption' => __('Posts per page label'),
|
||||
'info' => __('Posts per page help'),
|
||||
],
|
||||
'o_disp_users' => [
|
||||
'type' => 'number',
|
||||
'min' => 10,
|
||||
'max' => 50,
|
||||
'min' => '10',
|
||||
'max' => '50',
|
||||
'value' => $config->o_disp_users,
|
||||
'caption' => __('Users per page label'),
|
||||
'info' => __('Users per page help'),
|
||||
],
|
||||
'o_topic_review' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 50,
|
||||
'min' => '0',
|
||||
'max' => '50',
|
||||
'value' => $config->o_topic_review,
|
||||
'caption' => __('Topic review label'),
|
||||
'info' => __('Topic review help'),
|
||||
|
@ -506,7 +506,7 @@ class Options extends Admin
|
|||
],
|
||||
'o_avatars_dir' => [ //????
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $config->o_avatars_dir,
|
||||
'caption' => __('Upload directory label'),
|
||||
'info' => __('Upload directory help'),
|
||||
|
@ -514,24 +514,24 @@ class Options extends Admin
|
|||
],
|
||||
'o_avatars_width' => [
|
||||
'type' => 'number',
|
||||
'min' => 50,
|
||||
'max' => 999,
|
||||
'min' => '50',
|
||||
'max' => '999',
|
||||
'value' => $config->o_avatars_width,
|
||||
'caption' => __('Max width label'),
|
||||
'info' => __('Max width help'),
|
||||
],
|
||||
'o_avatars_height' => [
|
||||
'type' => 'number',
|
||||
'min' => 50,
|
||||
'max' => 999,
|
||||
'min' => '50',
|
||||
'max' => '999',
|
||||
'value' => $config->o_avatars_height,
|
||||
'caption' => __('Max height label'),
|
||||
'info' => __('Max height help'),
|
||||
],
|
||||
'o_avatars_size' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 9999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999',
|
||||
'value' => $config->o_avatars_size,
|
||||
'caption' => __('Max size label'),
|
||||
'info' => __('Max size help'),
|
||||
|
@ -544,7 +544,7 @@ class Options extends Admin
|
|||
'fields' => [
|
||||
'o_admin_email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $config->o_admin_email,
|
||||
'caption' => __('Admin e-mail label'),
|
||||
'info' => __('Admin e-mail help'),
|
||||
|
@ -553,7 +553,7 @@ class Options extends Admin
|
|||
],
|
||||
'o_webmaster_email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $config->o_webmaster_email,
|
||||
'caption' => __('Webmaster e-mail label'),
|
||||
'info' => __('Webmaster e-mail help'),
|
||||
|
@ -576,29 +576,29 @@ class Options extends Admin
|
|||
],
|
||||
'i_email_max_recipients' => [
|
||||
'type' => 'number',
|
||||
'min' => 1,
|
||||
'max' => 99999,
|
||||
'min' => '1',
|
||||
'max' => '99999',
|
||||
'value' => $config->i_email_max_recipients,
|
||||
'caption' => __('Email max recipients label'),
|
||||
'info' => __('Email max recipients help'),
|
||||
],
|
||||
'o_smtp_host' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $config->o_smtp_host,
|
||||
'caption' => __('SMTP address label'),
|
||||
'info' => __('SMTP address help'),
|
||||
],
|
||||
'o_smtp_user' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $config->o_smtp_user,
|
||||
'caption' => __('SMTP username label'),
|
||||
'info' => __('SMTP username help'),
|
||||
],
|
||||
'o_smtp_pass' => [
|
||||
'type' => 'password',
|
||||
'maxlength' => 255,
|
||||
'maxlength' => '255',
|
||||
'value' => $config->o_smtp_pass ? ' ' : null,
|
||||
'caption' => __('SMTP password label'),
|
||||
'info' => __('SMTP password help'),
|
||||
|
|
|
@ -427,7 +427,7 @@ class BBCode extends Parser
|
|||
'value' => $structure->tag,
|
||||
'caption' => __('Tag label'),
|
||||
'info' => __('Tag info'),
|
||||
'maxlength' => 11,
|
||||
'maxlength' => '11',
|
||||
'pattern' => '^[a-z\*][a-z\d-]{0,10}$',
|
||||
'required' => true,
|
||||
],
|
||||
|
@ -443,7 +443,7 @@ class BBCode extends Parser
|
|||
'value' => isset($this->bbTypes[$structure->type]) ? '' : $structure->type,
|
||||
'caption' => __('Type label'),
|
||||
'info' => __('New type info'),
|
||||
'maxlength' => 20,
|
||||
'maxlength' => '20',
|
||||
'pattern' => '^[a-z][a-z\d-]{0,19}$',
|
||||
],
|
||||
'parents' => [
|
||||
|
@ -514,8 +514,8 @@ class BBCode extends Parser
|
|||
'self_nesting' => [
|
||||
'type' => 'number',
|
||||
'value' => $structure->self_nesting > 0 ? $structure->self_nesting : 0,
|
||||
'min' => 0,
|
||||
'max' => 10,
|
||||
'min' => '0',
|
||||
'max' => '10',
|
||||
'caption' => __('Self nesting label'),
|
||||
'info' => __('Self nesting info'),
|
||||
],
|
||||
|
@ -577,7 +577,7 @@ class BBCode extends Parser
|
|||
'value' => $data['name'] ?? '',
|
||||
'caption' => __('Attribute name label'),
|
||||
'info' => __('Attribute name info'),
|
||||
'maxlength' => 15,
|
||||
'maxlength' => '15',
|
||||
'pattern' => '^[a-z-]{2,15}$',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ class Smilies extends Parser
|
|||
$fields["smilies[{$id}][sm_code]"] = [
|
||||
'class' => ['code', 'smile'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 20,
|
||||
'maxlength' => '20',
|
||||
'value' => $data['smilies'][$id]['sm_code'] ?? $cur['sm_code'],
|
||||
'caption' => __('Smiley code label'),
|
||||
'required' => true,
|
||||
|
@ -170,8 +170,8 @@ class Smilies extends Parser
|
|||
$fields["smilies[{$id}][sm_position]"] = [
|
||||
'class' => ['position', 'smile'],
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 255,
|
||||
'min' => '0',
|
||||
'max' => '255',
|
||||
'value' => $data['smilies'][$id]['sm_position'] ?? $cur['sm_position'],
|
||||
'caption' => __('Position label'),
|
||||
'required' => true,
|
||||
|
@ -221,15 +221,15 @@ class Smilies extends Parser
|
|||
'new_sm_code' => [
|
||||
'class' => ['code', 'new-smile'],
|
||||
'type' => 'text',
|
||||
'maxlength' => 20,
|
||||
'maxlength' => '20',
|
||||
'value' => $data['new_sm_code'] ?? '',
|
||||
'caption' => __('Smiley code label'),
|
||||
],
|
||||
'new_sm_position' => [
|
||||
'class' => ['position', 'new-smile'],
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 255,
|
||||
'min' => '0',
|
||||
'max' => '255',
|
||||
'value' => $data['new_sm_position'] ?? $max + 1,
|
||||
'caption' => __('Position label'),
|
||||
],
|
||||
|
|
|
@ -93,7 +93,7 @@ class NewUser extends Users
|
|||
'username' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'value' => $data['username'] ?? null,
|
||||
'caption' => __('Username'),
|
||||
'info' => __('Login format'),
|
||||
|
@ -102,7 +102,7 @@ class NewUser extends Users
|
|||
],
|
||||
'email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $data['email'] ?? null,
|
||||
'caption' => __('Email'),
|
||||
'info' => __('Email info'),
|
||||
|
|
|
@ -182,25 +182,25 @@ class View extends Users
|
|||
$fields = [];
|
||||
$fields['username'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Username label'),
|
||||
'value' => $data['username'] ?? null,
|
||||
];
|
||||
$fields['email'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __('E-mail address label'),
|
||||
'value' => $data['email'] ?? null,
|
||||
];
|
||||
$fields['title'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'maxlength' => '50',
|
||||
'caption' => __('Title label'),
|
||||
'value' => $data['title'] ?? null,
|
||||
];
|
||||
$fields['realname'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 40,
|
||||
'maxlength' => '40',
|
||||
'caption' => __('Real name label'),
|
||||
'value' => $data['realname'] ?? null,
|
||||
];
|
||||
|
@ -219,25 +219,25 @@ class View extends Users
|
|||
$fields['url'] = [
|
||||
'id' => 'website',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'caption' => __('Website label'),
|
||||
'value' => $data['url'] ?? null,
|
||||
];
|
||||
$fields['location'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 30,
|
||||
'maxlength' => '30',
|
||||
'caption' => __('Location label'),
|
||||
'value' => $data['location'] ?? null,
|
||||
];
|
||||
$fields['signature'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 512,
|
||||
'maxlength' => '512',
|
||||
'caption' => __('Signature label'),
|
||||
'value' => $data['signature'] ?? null,
|
||||
];
|
||||
$fields['admin_note'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 30,
|
||||
'maxlength' => '30',
|
||||
'caption' => __('Admin note label'),
|
||||
'value' => $data['admin_note'] ?? null,
|
||||
];
|
||||
|
@ -248,16 +248,16 @@ class View extends Users
|
|||
$fields['num_posts_1'] = [
|
||||
'type' => 'number',
|
||||
'class' => 'bstart',
|
||||
'min' => 0,
|
||||
'max' => 9999999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999999',
|
||||
'value' => $data['num_posts_1'] ?? null,
|
||||
'caption' => __('Posts label'),
|
||||
];
|
||||
$fields['num_posts_2'] = [
|
||||
'type' => 'number',
|
||||
'class' => 'bend',
|
||||
'min' => 0,
|
||||
'max' => 9999999999,
|
||||
'min' => '0',
|
||||
'max' => '9999999999',
|
||||
'value' => $data['num_posts_2'] ?? null,
|
||||
];
|
||||
$fields[] = [
|
||||
|
@ -270,14 +270,14 @@ class View extends Users
|
|||
$fields['last_post_1'] = [
|
||||
'class' => 'bstart',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['last_post_1'] ?? null,
|
||||
'caption' => __('Last post label'),
|
||||
];
|
||||
$fields['last_post_2'] = [
|
||||
'class' => 'bend',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['last_post_2'] ?? null,
|
||||
];
|
||||
$fields[] = [
|
||||
|
@ -290,14 +290,14 @@ class View extends Users
|
|||
$fields['last_visit_1'] = [
|
||||
'class' => 'bstart',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['last_visit_1'] ?? null,
|
||||
'caption' => __('Last visit label'),
|
||||
];
|
||||
$fields['last_visit_2'] = [
|
||||
'class' => 'bend',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['last_visit_2'] ?? null,
|
||||
];
|
||||
$fields[] = [
|
||||
|
@ -310,14 +310,14 @@ class View extends Users
|
|||
$fields['registered_1'] = [
|
||||
'class' => 'bstart',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['registered_1'] ?? null,
|
||||
'caption' => __('Registered label'),
|
||||
];
|
||||
$fields['registered_2'] = [
|
||||
'class' => 'bend',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'value' => $data['registered_2'] ?? null,
|
||||
];
|
||||
$fields[] = [
|
||||
|
@ -396,7 +396,7 @@ class View extends Users
|
|||
$fields = [];
|
||||
$fields['ip'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 49,
|
||||
'maxlength' => '49',
|
||||
'caption' => __('IP address label'),
|
||||
'value' => $data['ip'] ?? null,
|
||||
'required' => true,
|
||||
|
|
|
@ -267,7 +267,7 @@ class Auth extends Page
|
|||
'email' => [
|
||||
'autofocus' => true,
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $email,
|
||||
'caption' => __('Email'),
|
||||
'info' => __('Passphrase reset info'),
|
||||
|
|
|
@ -121,7 +121,7 @@ class Email extends Page
|
|||
'fields' => [
|
||||
'subject' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 70,
|
||||
'maxlength' => '70',
|
||||
'caption' => __('Email subject'),
|
||||
'required' => true,
|
||||
'value' => $vars['subject'] ?? null,
|
||||
|
|
|
@ -572,7 +572,7 @@ class Moderate extends Page
|
|||
if ($this->needSubject) {
|
||||
$fields['subject'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 70,
|
||||
'maxlength' => '70',
|
||||
'caption' => __('New subject'),
|
||||
'required' => true,
|
||||
'value' => '' == $v->subject ? $this->curTopic->subject : $v->subject,
|
||||
|
|
|
@ -50,7 +50,7 @@ trait PostFormTrait
|
|||
$fieldset['username'] = [
|
||||
'class' => 'w1',
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Username'),
|
||||
'required' => true,
|
||||
'pattern' => '^.{2,25}$',
|
||||
|
@ -60,7 +60,7 @@ trait PostFormTrait
|
|||
$fieldset['email'] = [
|
||||
'class' => 'w2',
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __('Email'),
|
||||
'required' => '1' == $this->c->config->p_force_guest_email,
|
||||
'pattern' => '.+@.+',
|
||||
|
@ -73,7 +73,7 @@ trait PostFormTrait
|
|||
$fieldset['subject'] = [
|
||||
'class' => 'w0',
|
||||
'type' => 'text',
|
||||
'maxlength' => 70,
|
||||
'maxlength' => '70',
|
||||
'caption' => __('Subject'),
|
||||
'required' => true,
|
||||
'value' => $vars['subject'] ?? null,
|
||||
|
|
|
@ -309,16 +309,16 @@ class Config extends Profile
|
|||
'fields' => [
|
||||
'disp_topics' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 50,
|
||||
'min' => '0',
|
||||
'max' => '50',
|
||||
'value' => $this->curUser->__disp_topics,
|
||||
'caption' => __('Topics per page label'),
|
||||
'info' => __('For default'),
|
||||
],
|
||||
'disp_posts' => [
|
||||
'type' => 'number',
|
||||
'min' => 0,
|
||||
'max' => 50,
|
||||
'min' => '0',
|
||||
'max' => '50',
|
||||
'value' => $this->curUser->__disp_posts,
|
||||
'caption' => __('Posts per page label'),
|
||||
'info' => __('For default'),
|
||||
|
|
|
@ -244,7 +244,7 @@ class Edit extends Profile
|
|||
if ($this->rules->rename) {
|
||||
$fields['username'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Username'),
|
||||
'required' => true,
|
||||
'pattern' => '^.{2,25}$',
|
||||
|
@ -290,7 +290,7 @@ class Edit extends Profile
|
|||
if ($this->rules->setTitle) {
|
||||
$fields['title'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 50,
|
||||
'maxlength' => '50',
|
||||
'caption' => __('Title'),
|
||||
'value' => $this->curUser->title,
|
||||
'info' => __('Leave blank'),
|
||||
|
@ -369,7 +369,7 @@ class Edit extends Profile
|
|||
'fields' => [
|
||||
'admin_note' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 30,
|
||||
'maxlength' => '30',
|
||||
'caption' => __('Admin note'),
|
||||
'value' => $this->curUser->admin_note,
|
||||
],
|
||||
|
@ -381,7 +381,7 @@ class Edit extends Profile
|
|||
$fields = [];
|
||||
$fields['realname'] = [
|
||||
'type' => 'text',
|
||||
'maxlength' => 40,
|
||||
'maxlength' => '40',
|
||||
'caption' => __('Realname'),
|
||||
'value' => $this->curUser->realname,
|
||||
];
|
||||
|
@ -447,7 +447,7 @@ class Edit extends Profile
|
|||
$fields['url'] = [
|
||||
'id' => 'website',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'caption' => __('Website'),
|
||||
'value' => $this->curUser->url,
|
||||
];
|
||||
|
|
|
@ -199,7 +199,7 @@ class Email extends Profile
|
|||
'fields' => [
|
||||
'new_email' => [
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'caption' => __($this->rules->confirmEmail ? 'New or old email' : 'New email'),
|
||||
'required' => true,
|
||||
'pattern' => '.+@.+',
|
||||
|
|
|
@ -41,7 +41,7 @@ class Pass extends Profile
|
|||
'new_pass' => 'New pass',
|
||||
'password' => 'Your passphrase',
|
||||
])->addArguments([
|
||||
'token' => ['id' => $this->curUser->id],
|
||||
'token' => ['id' => $this->curUser->id],
|
||||
])->addMessages([
|
||||
]);
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ class Register extends Page
|
|||
'autofocus' => true,
|
||||
'class' => 'hint',
|
||||
'type' => 'text',
|
||||
'maxlength' => 80,
|
||||
'maxlength' => '80',
|
||||
'value' => $v->email,
|
||||
'caption' => __('Email'),
|
||||
'info' => __('Email info'),
|
||||
|
@ -97,7 +97,7 @@ class Register extends Page
|
|||
'username' => [
|
||||
'class' => 'hint',
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'value' => $v->username,
|
||||
'caption' => __('Username'),
|
||||
'info' => __('Login format'),
|
||||
|
|
|
@ -159,7 +159,7 @@ class Search extends Page
|
|||
'keywords' => [
|
||||
'class' => 'w0',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'caption' => __('Keyword search'),
|
||||
'value' => $v ? $v->keywords : '',
|
||||
'required' => true,
|
||||
|
@ -199,7 +199,7 @@ class Search extends Page
|
|||
'keywords' => [
|
||||
'class' => 'w2',
|
||||
'type' => 'text',
|
||||
'maxlength' => 100,
|
||||
'maxlength' => '100',
|
||||
'caption' => __('Keyword search'),
|
||||
'value' => $v ? $v->keywords : '',
|
||||
'required' => true,
|
||||
|
@ -208,7 +208,7 @@ class Search extends Page
|
|||
'author' => [
|
||||
'class' => 'w1',
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'caption' => __('Author search'),
|
||||
'value' => $v ? $v->author : '*',
|
||||
'required' => true,
|
||||
|
|
|
@ -178,7 +178,7 @@ class Userlist extends Page
|
|||
$fields['name'] = [
|
||||
'class' => 'w0',
|
||||
'type' => 'text',
|
||||
'maxlength' => 25,
|
||||
'maxlength' => '25',
|
||||
'value' => $v->name ?: '*',
|
||||
'caption' => __('Username'),
|
||||
'info' => __('User search info'),
|
||||
|
|
Loading…
Add table
Reference in a new issue