Procházet zdrojové kódy

Change o_show_post_count

Visman před 3 roky
rodič
revize
a394735f89

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

@@ -1208,7 +1208,7 @@ class Install extends Admin
             'i_timeout_online'        => 900,
             'i_redirect_delay'        => 1,
             'b_show_user_info'        => 1,
-            'o_show_post_count'       => 1,
+            'b_show_post_count'       => 1,
             'o_smilies'               => 1,
             'o_smilies_sig'           => 1,
             'o_make_links'            => 1,

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

@@ -47,7 +47,7 @@ class Options extends Admin
                     'i_timeout_online'        => 'required|integer|min:0|max:99999|check_timeout',
                     'i_redirect_delay'        => 'required|integer|min:0|max:99999',
                     'b_show_user_info'        => 'required|integer|in:0,1',
-                    'o_show_post_count'       => 'required|integer|in:0,1',
+                    'b_show_post_count'       => 'required|integer|in:0,1',
                     'i_topic_review'          => 'required|integer|min:0|max:50',
                     'i_disp_topics_default'   => 'required|integer|min:10|max:50',
                     'i_disp_posts_default'    => 'required|integer|min:10|max:50',
@@ -333,9 +333,9 @@ class Options extends Admin
                     'caption' => 'Info in posts label',
                     'help'    => 'Info in posts help',
                 ],
-                'o_show_post_count' => [
+                'b_show_post_count' => [
                     'type'    => 'radio',
-                    'value'   => $config->o_show_post_count,
+                    'value'   => $config->b_show_post_count,
                     'values'  => $yn,
                     'caption' => 'Post count label',
                     'help'    => 'Post count help',

+ 6 - 4
app/Models/Pages/Admin/Update.php

@@ -498,15 +498,17 @@ class Update extends Admin
      */
     protected function stageNumber43(array $args): ?int
     {
-        $this->c->config->i_timeout_visit = $this->c->config->o_timeout_visit ?? 3600;
-        $this->c->config->i_timeout_online = $this->c->config->o_timeout_online ?? 900;
-        $this->c->config->i_redirect_delay = $this->c->config->o_redirect_delay ?? 1;
-        $this->c->config->b_show_user_info = '1' == $this->c->config->o_show_user_info ? 1 : 0;
+        $this->c->config->i_timeout_visit   = $this->c->config->o_timeout_visit ?? 3600;
+        $this->c->config->i_timeout_online  = $this->c->config->o_timeout_online ?? 900;
+        $this->c->config->i_redirect_delay  = $this->c->config->o_redirect_delay ?? 1;
+        $this->c->config->b_show_user_info  = '1' == $this->c->config->o_show_user_info ? 1 : 0;
+        $this->c->config->o_show_post_count = '1' == $this->c->config->o_show_post_count ? 1 : 0;
 
         unset($this->c->config->o_timeout_visit);
         unset($this->c->config->o_timeout_online);
         unset($this->c->config->o_redirect_delay);
         unset($this->c->config->o_show_user_info);
+        unset($this->c->config->o_show_post_count);
 
         $this->c->config->save();
 

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

@@ -306,7 +306,7 @@ class User extends DataModel
      */
     protected function getshowPostCount(): bool
     {
-        return '1' == $this->c->config->o_show_post_count || $this->isAdmMod;
+        return 1 == $this->c->config->b_show_post_count || $this->isAdmMod;
     }
 
     /**