diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-01 15:29:47 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-08-01 15:29:47 +0000 |
commit | ced8624b8e86bc6aac143163e538f87376319079 (patch) | |
tree | 7479c2699efb9bd9c6785e0f5ecd4f792d8ca59e /phpBB/includes/functions_posting.php | |
parent | 541dbf8af07874e9507249a7e62cc3c32475d475 (diff) | |
download | forums-ced8624b8e86bc6aac143163e538f87376319079.tar forums-ced8624b8e86bc6aac143163e538f87376319079.tar.gz forums-ced8624b8e86bc6aac143163e538f87376319079.tar.bz2 forums-ced8624b8e86bc6aac143163e538f87376319079.tar.xz forums-ced8624b8e86bc6aac143163e538f87376319079.zip |
- fixing some bugs
- shortening some db columns to meet the requirements
- correctly increase/decrease user post counts
- fix the topic title length bug(s)
git-svn-id: file:///svn/phpbb/trunk@6224 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 328677d4a9..254352503d 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1267,7 +1267,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data) break; } - $sql_data[USERS_TABLE] = ($auth->acl_get('f_postcount', $forum_id)) ? 'user_posts = user_posts - 1' : ''; +// $sql_data[USERS_TABLE] = ($data['post_postcount']) ? 'user_posts = user_posts - 1' : ''; $db->sql_transaction('begin'); @@ -1346,6 +1346,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $post_mode = ($data['topic_first_post_id'] == $data['topic_last_post_id']) ? 'edit_topic' : (($data['topic_first_post_id'] == $data['post_id']) ? 'edit_first_post' : (($data['topic_last_post_id'] == $data['post_id']) ? 'edit_last_post' : 'edit')); } + // First of all make sure the subject and topic title are having the correct length. + // To achive this without cutting off between special chars we convert to an array and then count the elements. + $subject = truncate_string($subject); + $data['topic_title'] = truncate_string($data['topic_title']); + // Collect some basic informations about which tables and which rows to update/insert $sql_data = array(); $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id']; @@ -1374,6 +1379,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u 'post_attachment' => (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data'])) ? 1 : 0, 'bbcode_bitfield' => $data['bbcode_bitfield'], 'bbcode_uid' => $data['bbcode_uid'], + 'post_postcount' => ($auth->acl_get('f_postcount', $data['forum_id']) ? 1 : 0, 'post_edit_locked' => $data['post_edit_locked'] ); break; |