Browse Source

Change o_quickpost

Visman 3 years ago
parent
commit
14b859051c

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

@@ -1219,7 +1219,7 @@ class Install extends Admin
             'i_disp_topics_default'   => 30,
             'i_disp_posts_default'    => 25,
             'i_disp_users'            => 50,
-            'o_quickpost'             => 1,
+            'b_quickpost'             => 1,
             'o_users_online'          => 1,
             'o_censoring'             => 0,
             'o_show_dot'              => 0,

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

@@ -52,7 +52,7 @@ class Options extends Admin
                     'i_disp_topics_default'   => 'required|integer|min:10|max:50',
                     'i_disp_posts_default'    => 'required|integer|min:10|max:50',
                     'i_disp_users'            => 'required|integer|min:10|max:50',
-                    'o_quickpost'             => 'required|integer|in:0,1',
+                    'b_quickpost'             => 'required|integer|in:0,1',
                     'o_users_online'          => 'required|integer|in:0,1',
                     'o_show_dot'              => 'required|integer|in:0,1',
                     'o_topic_views'           => 'required|integer|in:0,1',
@@ -406,9 +406,9 @@ class Options extends Admin
         $form['sets']['features'] = [
             'legend' => 'Features subhead',
             'fields' => [
-                'o_quickpost' => [
+                'b_quickpost' => [
                     'type'    => 'radio',
-                    'value'   => $config->o_quickpost,
+                    'value'   => $config->b_quickpost,
                     'values'  => $yn,
                     'caption' => 'Quick post label',
                     'help'    => 'Quick post help',

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

@@ -506,6 +506,7 @@ class Update extends Admin
         $this->c->config->b_smilies_sig     = '1' == $this->c->config->o_smilies_sig ? 1 : 0;
         $this->c->config->b_smilies         = '1' == $this->c->config->o_smilies ? 1 : 0;
         $this->c->config->b_make_links      = '1' == $this->c->config->o_make_links ? 1 : 0;
+        $this->c->config->b_quickpost       = '1' == $this->c->config->o_quickpost ? 1 : 0;
 
         unset($this->c->config->o_timeout_visit);
         unset($this->c->config->o_timeout_online);
@@ -514,7 +515,8 @@ class Update extends Admin
         unset($this->c->config->o_show_post_count);
         unset($this->c->config->o_smilies_sig);
         unset($this->c->config->o_smilies);
-        unset($this->c->config->o_make_links)ж
+        unset($this->c->config->o_make_links);
+        unset($this->c->config->o_quickpost);
 
         $this->c->config->save();
 

+ 1 - 1
app/Models/Pages/PM/PMTopic.php

@@ -213,7 +213,7 @@ class PMTopic extends AbstractPM
 
         if (
             $this->model->canReply
-            && '1' == $this->c->config->o_quickpost
+            && 1 == $this->c->config->b_quickpost
         ) {
             $form = $this->messageForm(null, 'PMAction', $this->model->dataReply, false, false, true);
 

+ 1 - 1
app/Models/Pages/Topic.php

@@ -146,7 +146,7 @@ class Topic extends Page
 
         if (
             $topic->canReply
-            && '1' == $this->c->config->o_quickpost
+            && 1 == $this->c->config->b_quickpost
         ) {
             $this->form     = $this->messageForm($topic, 'NewReply', ['id' => $topic->id], false, false, true);
         }