瀏覽代碼

Change o_topic_views

Visman 3 年之前
父節點
當前提交
e4255b48be

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

@@ -1223,7 +1223,7 @@ class Install extends Admin
             'b_users_online'          => 1,
             'b_users_online'          => 1,
             'b_censoring'             => 0,
             'b_censoring'             => 0,
             'b_show_dot'              => 0,
             'b_show_dot'              => 0,
-            'o_topic_views'           => 1,
+            'b_topic_views'           => 1,
             'o_quickjump'             => 1,
             'o_quickjump'             => 1,
             'o_additional_navlinks'   => '',
             'o_additional_navlinks'   => '',
             'i_report_method'         => 0,
             'i_report_method'         => 0,

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

@@ -55,7 +55,7 @@ class Options extends Admin
                     'b_quickpost'             => 'required|integer|in:0,1',
                     'b_quickpost'             => 'required|integer|in:0,1',
                     'b_users_online'          => 'required|integer|in:0,1',
                     'b_users_online'          => 'required|integer|in:0,1',
                     'b_show_dot'              => 'required|integer|in:0,1',
                     'b_show_dot'              => 'required|integer|in:0,1',
-                    'o_topic_views'           => 'required|integer|in:0,1',
+                    'b_topic_views'           => 'required|integer|in:0,1',
                     'o_quickjump'             => 'required|integer|in:0,1',
                     'o_quickjump'             => 'required|integer|in:0,1',
                     'o_search_all_forums'     => 'required|integer|in:0,1',
                     'o_search_all_forums'     => 'required|integer|in:0,1',
                     'o_additional_navlinks'   => 'string:trim|max:65000 bytes',
                     'o_additional_navlinks'   => 'string:trim|max:65000 bytes',
@@ -427,9 +427,9 @@ class Options extends Admin
                     'caption' => 'User has posted label',
                     'caption' => 'User has posted label',
                     'help'    => 'User has posted help',
                     'help'    => 'User has posted help',
                 ],
                 ],
-                'o_topic_views' => [
+                'b_topic_views' => [
                     'type'    => 'radio',
                     'type'    => 'radio',
-                    'value'   => $config->o_topic_views,
+                    'value'   => $config->b_topic_views,
                     'values'  => $yn,
                     'values'  => $yn,
                     'caption' => 'Topic views label',
                     'caption' => 'Topic views label',
                     'help'    => 'Topic views help',
                     'help'    => 'Topic views help',

+ 2 - 0
app/Models/Pages/Admin/Update.php

@@ -510,7 +510,9 @@ class Update extends Admin
         $this->c->config->b_users_online    = '1' == $this->c->config->o_users_online ? 1 : 0;
         $this->c->config->b_users_online    = '1' == $this->c->config->o_users_online ? 1 : 0;
         $this->c->config->b_censoring       = '1' == $this->c->config->o_censoring ? 1 : 0;
         $this->c->config->b_censoring       = '1' == $this->c->config->o_censoring ? 1 : 0;
         $this->c->config->b_show_dot        = '1' == $this->c->config->o_show_dot ? 1 : 0;
         $this->c->config->b_show_dot        = '1' == $this->c->config->o_show_dot ? 1 : 0;
+        $this->c->config->b_topic_views     = '1' == $this->c->config->o_topic_views ? 1 : 0;
 
 
+        unset($this->c->config->o_topic_views);
         unset($this->c->config->o_show_dot);
         unset($this->c->config->o_show_dot);
         unset($this->c->config->o_timeout_visit);
         unset($this->c->config->o_timeout_visit);
         unset($this->c->config->o_timeout_online);
         unset($this->c->config->o_timeout_online);

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

@@ -434,7 +434,7 @@ class Topic extends DataModel
      */
      */
     protected function getshowViews(): bool
     protected function getshowViews(): bool
     {
     {
-        return '1' == $this->c->config->o_topic_views;
+        return 1 == $this->c->config->b_topic_views;
     }
     }
 
 
     /**
     /**