From 73c1c4dcf103e3b93cc4dfc5548fe538a5c1d150 Mon Sep 17 00:00:00 2001 From: Visman Date: Sun, 19 Dec 2021 14:15:17 +0700 Subject: [PATCH] Change p_sig_bbcode --- app/Core/Parser.php | 6 +++--- app/Models/Pages/Admin/Install.php | 2 +- app/Models/Pages/Admin/Parser/Edit.php | 6 +++--- app/Models/Pages/Admin/Update.php | 2 ++ 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Core/Parser.php b/app/Core/Parser.php index bb9835bb..dbe73967 100644 --- a/app/Core/Parser.php +++ b/app/Core/Parser.php @@ -35,7 +35,7 @@ class Parser extends Parserus { if ( 1 == $this->c->config->b_message_bbcode - || '1' == $this->c->config->p_sig_bbcode + || 1 == $this->c->config->b_sig_bbcode ) { $this->setBBCodes($this->c->bbcode->list); } @@ -71,7 +71,7 @@ class Parser extends Parserus public function prepare(string $text, bool $isSignature = false): string { if ($isSignature) { - $whiteList = '1' == $this->c->config->p_sig_bbcode + $whiteList = 1 == $this->c->config->b_sig_bbcode ? (empty($this->c->config->a_bb_white_sig) && empty($this->c->config->a_bb_black_sig) ? null : $this->c->config->a_bb_white_sig @@ -134,7 +134,7 @@ class Parser extends Parserus { // при null предполагается брать данные после prepare() if (null !== $text) { - $whiteList = '1' == $this->c->config->p_sig_bbcode ? null : []; + $whiteList = 1 == $this->c->config->b_sig_bbcode ? null : []; $blackList = $this->c->config->a_bb_black_sig; $this->setAttr('isSign', true) diff --git a/app/Models/Pages/Admin/Install.php b/app/Models/Pages/Admin/Install.php index 847d0595..1c4ee48c 100644 --- a/app/Models/Pages/Admin/Install.php +++ b/app/Models/Pages/Admin/Install.php @@ -1258,7 +1258,7 @@ class Install extends Admin 'b_message_all_caps' => 0, 'b_subject_all_caps' => 0, 'b_sig_all_caps' => 0, - 'p_sig_bbcode' => 1, + 'b_sig_bbcode' => 1, 'p_force_guest_email' => 1, 'b_pm' => 0, 'b_poll_enabled' => 0, diff --git a/app/Models/Pages/Admin/Parser/Edit.php b/app/Models/Pages/Admin/Parser/Edit.php index 77cd5b2f..d46937ff 100644 --- a/app/Models/Pages/Admin/Parser/Edit.php +++ b/app/Models/Pages/Admin/Parser/Edit.php @@ -31,7 +31,7 @@ class Edit extends Parser ])->addRules([ 'token' => 'token:AdminParser', 'b_message_bbcode' => 'required|integer|in:0,1', - 'p_sig_bbcode' => 'required|integer|in:0,1', + 'b_sig_bbcode' => 'required|integer|in:0,1', 'b_smilies' => 'required|integer|in:0,1', 'b_smilies_sig' => 'required|integer|in:0,1', 'b_make_links' => 'required|integer|in:0,1', @@ -97,9 +97,9 @@ class Edit extends Parser 'caption' => 'BBCode label', 'help' => 'BBCode help', ], - 'p_sig_bbcode' => [ + 'b_sig_bbcode' => [ 'type' => 'radio', - 'value' => $config->p_sig_bbcode, + 'value' => $config->b_sig_bbcode, 'values' => $yn, 'caption' => 'BBCode sigs label', 'help' => 'BBCode sigs help', diff --git a/app/Models/Pages/Admin/Update.php b/app/Models/Pages/Admin/Update.php index 6b2488d5..7e67ceca 100644 --- a/app/Models/Pages/Admin/Update.php +++ b/app/Models/Pages/Admin/Update.php @@ -527,7 +527,9 @@ class Update extends Admin $config->b_message_all_caps = '1' == $config->p_message_all_caps ? 1 : 0; $config->b_subject_all_caps = '1' == $config->p_subject_all_caps ? 1 : 0; $config->b_sig_all_caps = '1' == $config->p_sig_all_caps ? 1 : 0; + $config->b_sig_bbcode = '1' == $config->p_sig_bbcode ? 1 : 0; + unset($config->p_sig_bbcode); unset($config->p_sig_all_caps); unset($config->p_subject_all_caps); unset($config->p_message_all_caps);