Ver código fonte

Delete o_quote_depth from config

Visman 4 anos atrás
pai
commit
657e061c4f

+ 0 - 12
app/Core/Parser.php

@@ -56,18 +56,6 @@ class Parser extends Parserus
         $this->setAttr('showImgSign', '0' != $this->c->user->show_img_sig);
     }
 
-    /**
-     * Метод добавляет один bb-код
-     */
-    public function addBBCode(array $bb): Parserus
-    {
-        if ('quote' == $bb['tag']) {
-            $bb['self nesting'] = (int) $this->c->config->o_quote_depth;
-        }
-
-        return parent::addBBCode($bb);
-    }
-
     /**
      * Проверяет разметку сообщения с бб-кодами
      * Пытается исправить неточности разметки

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

@@ -1059,7 +1059,6 @@ class Install extends Admin
             'o_disp_topics_default'   => 30,
             'o_disp_posts_default'    => 25,
             'o_disp_users'            => 50,
-            'o_quote_depth'           => 3,
             'o_quickpost'             => 1,
             'o_users_online'          => 1,
             'o_censoring'             => 0,

+ 0 - 9
app/Models/Pages/Admin/Parser/Edit.php

@@ -29,7 +29,6 @@ class Edit extends Parser
                     'o_smilies'           => 'required|integer|in:0,1',
                     'o_smilies_sig'       => 'required|integer|in:0,1',
                     'o_make_links'        => 'required|integer|in:0,1',
-                    'o_quote_depth'       => 'required|integer|min:0|max:9',
                 ])->addAliases([
                 ])->addArguments([
                 ])->addMessages([
@@ -121,14 +120,6 @@ class Edit extends Parser
                     'caption' => __('Clickable links label'),
                     'info'    => __('Clickable links help'),
                 ],
-                'o_quote_depth' => [
-                    'type'    => 'number',
-                    'min'     => 0,
-                    'max'     => 9,
-                    'value'   => $config->o_quote_depth,
-                    'caption' => __('Quote depth label'),
-                    'info'    => __('Quote depth help'),
-                ],
                 'bbcode_management' => [
                     'type'    => 'btn',
                     'caption' => null,

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

@@ -17,7 +17,7 @@ class Update extends Admin
 {
     const PHP_MIN = '7.3.0';
 
-    const LATEST_REV_WITH_DB_CHANGES = 15;
+    const LATEST_REV_WITH_DB_CHANGES = 16;
 
     const LOCK_NAME = 'lock_update';
     const LOCk_TTL  = 1800;
@@ -712,4 +712,14 @@ class Update extends Admin
 
         return null;
     }
+
+    /**
+     * rev.15 to rev.16
+     */
+    protected function stageNumber15(array $args): ?int
+    {
+        unset($this->c->config->o_quote_depth);
+
+        $this->c->config->save();
+    }
 }

+ 1 - 1
app/bootstrap.php

@@ -42,7 +42,7 @@ if (
 }
 $c->PUBLIC_URL = $c->BASE_URL . $forkPublicPrefix;
 
-$c->FORK_REVISION = 15;
+$c->FORK_REVISION = 16;
 $c->START         = $forkStart;
 $c->DIR_APP       = __DIR__;
 $c->DIR_PUBLIC    = $forkPublic;

+ 0 - 6
app/lang/en/admin_parser.po

@@ -66,12 +66,6 @@ msgstr "Make clickable links"
 msgid "Clickable links help"
 msgstr "When enabled, ForkBB will automatically detect any URLs in posts and make them clickable hyperlinks."
 
-msgid "Quote depth label"
-msgstr "Maximum [quote] depth"
-
-msgid "Quote depth help"
-msgstr "The maximum times a [quote] tag can go inside other [quote] tags, any tags deeper than this will be discarded."
-
 msgid "BBCode management"
 msgstr "BBCode management"
 

+ 0 - 6
app/lang/ru/admin_parser.po

@@ -66,12 +66,6 @@ msgstr "Распознавать ссылки"
 msgid "Clickable links help"
 msgstr "Если включено, ForkBB будет автоматически распознавать URL-ы в сообщениях и делать их кликабельными гиперссылками."
 
-msgid "Quote depth label"
-msgstr "Максимальная глубина [quote]"
-
-msgid "Quote depth help"
-msgstr "Сколько раз тег [quote] может вкладываться в другие [quote], все теги свыше указанного порога будут игнорироваться."
-
 msgid "BBCode management"
 msgstr "Управление BB-кодами"