Change o_topic_views

This commit is contained in:
Visman 2021-12-19 12:52:10 +07:00
parent 0dd4668665
commit e4255b48be
4 changed files with 7 additions and 5 deletions

View file

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

View file

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

View file

@ -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_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_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_timeout_visit);
unset($this->c->config->o_timeout_online);

View file

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