Change o_avatars
This commit is contained in:
parent
6b98c30aeb
commit
55ba45e6a8
5 changed files with 8 additions and 6 deletions
|
@ -1229,7 +1229,7 @@ class Install extends Admin
|
|||
'b_regs_report' => 0,
|
||||
'i_default_email_setting' => 2,
|
||||
'o_mailing_list' => $v->email,
|
||||
'o_avatars' => \in_array(\strtolower(@\ini_get('file_uploads')), ['on', 'true', '1'], true) ? 1 : 0,
|
||||
'b_avatars' => \in_array(\strtolower(@\ini_get('file_uploads')), ['on', 'true', '1'], true) ? 1 : 0,
|
||||
'o_avatars_dir' => '/img/avatars',
|
||||
'i_avatars_width' => 60,
|
||||
'i_avatars_height' => 60,
|
||||
|
|
|
@ -62,7 +62,7 @@ class Options extends Admin
|
|||
'i_feed_ttl' => 'required|integer|in:0,5,15,30,60',
|
||||
'i_report_method' => 'required|integer|in:0,1,2',
|
||||
'o_mailing_list' => 'string:trim|max:65000 bytes', // ???? проверка списка email
|
||||
'o_avatars' => 'required|integer|in:0,1',
|
||||
'b_avatars' => 'required|integer|in:0,1',
|
||||
'o_avatars_dir' => 'required|string:trim|max:255|check_dir',
|
||||
'i_avatars_width' => 'required|integer|min:50|max:999',
|
||||
'i_avatars_height' => 'required|integer|min:50|max:999',
|
||||
|
@ -507,9 +507,9 @@ class Options extends Admin
|
|||
$form['sets']['avatars'] = [
|
||||
'legend' => 'Avatars subhead',
|
||||
'fields' => [
|
||||
'o_avatars' => [
|
||||
'b_avatars' => [
|
||||
'type' => 'radio',
|
||||
'value' => $config->o_avatars,
|
||||
'value' => $config->b_avatars,
|
||||
'values' => $yn,
|
||||
'caption' => 'Use avatars label',
|
||||
'help' => 'Use avatars help',
|
||||
|
|
|
@ -514,7 +514,9 @@ class Update extends Admin
|
|||
$config->b_show_dot = '1' == $config->o_show_dot ? 1 : 0;
|
||||
$config->b_topic_views = '1' == $config->o_topic_views ? 1 : 0;
|
||||
$config->b_regs_report = '1' == $config->o_regs_report ? 1 : 0;
|
||||
$config->b_avatars = '1' == $config->o_avatars ? 1 : 0;
|
||||
|
||||
unset($config->o_avatars);
|
||||
unset($config->o_regs_report);
|
||||
unset($config->o_topic_views);
|
||||
unset($config->o_show_dot);
|
||||
|
|
|
@ -142,7 +142,7 @@ class Profile extends Rules
|
|||
|
||||
protected function getuseAvatar(): bool
|
||||
{
|
||||
return '1' == $this->c->config->o_avatars;
|
||||
return 1 == $this->c->config->b_avatars;
|
||||
}
|
||||
|
||||
protected function getuseSignature(): bool
|
||||
|
|
|
@ -282,7 +282,7 @@ class User extends DataModel
|
|||
*/
|
||||
protected function getshowAvatar(): bool
|
||||
{
|
||||
return '1' == $this->c->config->o_avatars && 1 == $this->show_avatars;
|
||||
return 1 == $this->c->config->b_avatars && 1 == $this->show_avatars;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue