Change o_users_online

This commit is contained in:
Visman 2021-12-19 12:42:23 +07:00
parent 14b859051c
commit 7916b5c128
4 changed files with 7 additions and 5 deletions

View file

@ -57,7 +57,7 @@ class Online extends Model
if (null === $position) {
return $this;
}
$detail = $page->onlineDetail && '1' == $this->c->config->o_users_online;
$detail = $page->onlineDetail && 1 == $this->c->config->b_users_online;
$filter = $page->onlineFilter;
$this->updateUser($position);

View file

@ -1220,7 +1220,7 @@ class Install extends Admin
'i_disp_posts_default' => 25,
'i_disp_users' => 50,
'b_quickpost' => 1,
'o_users_online' => 1,
'b_users_online' => 1,
'o_censoring' => 0,
'o_show_dot' => 0,
'o_topic_views' => 1,

View file

@ -53,7 +53,7 @@ class Options extends Admin
'i_disp_posts_default' => 'required|integer|min:10|max:50',
'i_disp_users' => 'required|integer|min:10|max:50',
'b_quickpost' => 'required|integer|in:0,1',
'o_users_online' => 'required|integer|in:0,1',
'b_users_online' => 'required|integer|in:0,1',
'o_show_dot' => 'required|integer|in:0,1',
'o_topic_views' => 'required|integer|in:0,1',
'o_quickjump' => 'required|integer|in:0,1',
@ -413,9 +413,9 @@ class Options extends Admin
'caption' => 'Quick post label',
'help' => 'Quick post help',
],
'o_users_online' => [
'b_users_online' => [
'type' => 'radio',
'value' => $config->o_users_online,
'value' => $config->b_users_online,
'values' => $yn,
'caption' => 'Users online label',
'help' => 'Users online help',

View file

@ -507,6 +507,7 @@ class Update extends Admin
$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;
$this->c->config->b_users_online = '1' == $this->c->config->o_users_online ? 1 : 0;
unset($this->c->config->o_timeout_visit);
unset($this->c->config->o_timeout_online);
@ -517,6 +518,7 @@ class Update extends Admin
unset($this->c->config->o_smilies);
unset($this->c->config->o_make_links);
unset($this->c->config->o_quickpost);
unset($this->c->config->o_users_online);
$this->c->config->save();