Maked max post length configurable (#174)

* Maked max post length configurable

* Update config.php
This commit is contained in:
Roman Kelesidis 2023-06-13 15:25:03 +07:00 committed by GitHub
parent 3e80693173
commit de09245b9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ switch($this->request['type'])
{
$message = "[quote]". $post['topic_title'] ."[/quote]\r";
}
if (mb_strlen($message, 'UTF-8') > 1000)
if (mb_strlen($message, 'UTF-8') > $bb_cfg['max_post_length'])
{
$this->response['redirect'] = make_url(POSTING_URL.'?mode=quote&p='. $post_id);
}
@ -125,7 +125,7 @@ switch($this->request['type'])
{
$this->ajax_die($lang['EDIT_OWN_POSTS']);
}
if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id))
if ((mb_strlen($post['post_text'], 'UTF-8') > $bb_cfg['max_post_length']) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id))
{
$this->response['redirect'] = make_url(POSTING_URL.'?mode=editpost&p='. $post_id);
}

View File

@ -466,7 +466,7 @@ $bb_cfg['user_signature_end'] = '</div>'; // Это позволит и
// Posts
$bb_cfg['use_posts_cache'] = true; // if you switch from ON to OFF, you need to TRUNCATE `bb_posts_html` table
$bb_cfg['posts_cache_days_keep'] = 14;
$bb_cfg['max_post_length'] = 120000; // bytes
$bb_cfg['max_post_length'] = 2500; // Max symbols in post
$bb_cfg['use_ajax_posts'] = true;
// Search