mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
Maked max post length configurable (#793)
This commit is contained in:
parent
2369e4cc0c
commit
fd42eae329
1 changed files with 2 additions and 2 deletions
|
@ -94,7 +94,7 @@ switch ($this->request['type']) {
|
||||||
if ($post['post_id'] == $post['topic_first_post_id']) {
|
if ($post['post_id'] == $post['topic_first_post_id']) {
|
||||||
$message = "[quote]" . $post['topic_title'] . "[/quote]\r";
|
$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);
|
$this->response['redirect'] = make_url(POSTING_URL . '?mode=quote&p=' . $post_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ switch ($this->request['type']) {
|
||||||
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod']) {
|
if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod']) {
|
||||||
$this->ajax_die($lang['EDIT_OWN_POSTS']);
|
$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);
|
$this->response['redirect'] = make_url(POSTING_URL . '?mode=editpost&p=' . $post_id);
|
||||||
} elseif ($this->request['type'] == 'editor') {
|
} elseif ($this->request['type'] == 'editor') {
|
||||||
$text = (string)$this->request['text'];
|
$text = (string)$this->request['text'];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue