Change o_quickpost

This commit is contained in:
Visman 2021-12-19 12:39:52 +07:00
parent 8b6acc5d7f
commit 14b859051c
5 changed files with 9 additions and 7 deletions

View file

@ -1219,7 +1219,7 @@ class Install extends Admin
'i_disp_topics_default' => 30,
'i_disp_posts_default' => 25,
'i_disp_users' => 50,
'o_quickpost' => 1,
'b_quickpost' => 1,
'o_users_online' => 1,
'o_censoring' => 0,
'o_show_dot' => 0,

View file

@ -52,7 +52,7 @@ class Options extends Admin
'i_disp_topics_default' => 'required|integer|min:10|max:50',
'i_disp_posts_default' => 'required|integer|min:10|max:50',
'i_disp_users' => 'required|integer|min:10|max:50',
'o_quickpost' => 'required|integer|in:0,1',
'b_quickpost' => 'required|integer|in:0,1',
'o_users_online' => 'required|integer|in:0,1',
'o_show_dot' => 'required|integer|in:0,1',
'o_topic_views' => 'required|integer|in:0,1',
@ -406,9 +406,9 @@ class Options extends Admin
$form['sets']['features'] = [
'legend' => 'Features subhead',
'fields' => [
'o_quickpost' => [
'b_quickpost' => [
'type' => 'radio',
'value' => $config->o_quickpost,
'value' => $config->b_quickpost,
'values' => $yn,
'caption' => 'Quick post label',
'help' => 'Quick post help',

View file

@ -506,6 +506,7 @@ class Update extends Admin
$this->c->config->b_smilies_sig = '1' == $this->c->config->o_smilies_sig ? 1 : 0;
$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;
unset($this->c->config->o_timeout_visit);
unset($this->c->config->o_timeout_online);
@ -514,7 +515,8 @@ class Update extends Admin
unset($this->c->config->o_show_post_count);
unset($this->c->config->o_smilies_sig);
unset($this->c->config->o_smilies);
unset($this->c->config->o_make_links)ж
unset($this->c->config->o_make_links);
unset($this->c->config->o_quickpost);
$this->c->config->save();

View file

@ -213,7 +213,7 @@ class PMTopic extends AbstractPM
if (
$this->model->canReply
&& '1' == $this->c->config->o_quickpost
&& 1 == $this->c->config->b_quickpost
) {
$form = $this->messageForm(null, 'PMAction', $this->model->dataReply, false, false, true);

View file

@ -146,7 +146,7 @@ class Topic extends Page
if (
$topic->canReply
&& '1' == $this->c->config->o_quickpost
&& 1 == $this->c->config->b_quickpost
) {
$this->form = $this->messageForm($topic, 'NewReply', ['id' => $topic->id], false, false, true);
}