Change o_timeout_online
This commit is contained in:
parent
e6ecc16327
commit
a8aec1a9f7
4 changed files with 7 additions and 5 deletions
|
@ -64,7 +64,7 @@ class Online extends Model
|
|||
|
||||
$all = 0;
|
||||
$now = \time();
|
||||
$tOnline = $now - $this->c->config->o_timeout_online;
|
||||
$tOnline = $now - $this->c->config->i_timeout_online;
|
||||
$tVisit = $now - $this->c->config->i_timeout_visit;
|
||||
$users = [];
|
||||
$guests = [];
|
||||
|
|
|
@ -1205,7 +1205,7 @@ class Install extends Admin
|
|||
'o_board_desc' => $v->descr,
|
||||
'o_default_timezone' => 0,
|
||||
'i_timeout_visit' => 3600,
|
||||
'o_timeout_online' => 900,
|
||||
'i_timeout_online' => 900,
|
||||
'o_redirect_delay' => 1,
|
||||
'o_show_user_info' => 1,
|
||||
'o_show_post_count' => 1,
|
||||
|
|
|
@ -44,7 +44,7 @@ class Options extends Admin
|
|||
'o_default_lang' => 'required|string:trim|in:' . \implode(',', $this->c->Func->getLangs()),
|
||||
'o_default_style' => 'required|string:trim|in:' . \implode(',', $this->c->Func->getStyles()),
|
||||
'i_timeout_visit' => 'required|integer|min:0|max:99999',
|
||||
'o_timeout_online' => 'required|integer|min:0|max:99999|check_timeout',
|
||||
'i_timeout_online' => 'required|integer|min:0|max:99999|check_timeout',
|
||||
'o_redirect_delay' => 'required|integer|min:0|max:99999',
|
||||
'o_show_user_info' => 'required|integer|in:0,1',
|
||||
'o_show_post_count' => 'required|integer|in:0,1',
|
||||
|
@ -304,11 +304,11 @@ class Options extends Admin
|
|||
'caption' => 'Visit timeout label',
|
||||
'help' => 'Visit timeout help',
|
||||
],
|
||||
'o_timeout_online' => [
|
||||
'i_timeout_online' => [
|
||||
'type' => 'number',
|
||||
'min' => '0',
|
||||
'max' => '99999',
|
||||
'value' => $config->o_timeout_online,
|
||||
'value' => $config->i_timeout_online,
|
||||
'caption' => 'Online timeout label',
|
||||
'help' => 'Online timeout help',
|
||||
],
|
||||
|
|
|
@ -499,8 +499,10 @@ 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;
|
||||
|
||||
unset($this->c->config->o_timeout_visit);
|
||||
unset($this->c->config->o_timeout_online);
|
||||
|
||||
$this->c->config->save();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue