diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-15 18:49:54 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2005-01-15 18:49:54 +0000 |
| commit | f68771d64ce689fe4e9300c88d5d53b0c685c6ef (patch) | |
| tree | 6e4c441547692d13c8da09ee1ac0dc8ef2770b3d /phpBB/posting.php | |
| parent | 2e4ae506a60fb062a5f93e71aa5bf3e0e8b6635e (diff) | |
| download | forums-f68771d64ce689fe4e9300c88d5d53b0c685c6ef.tar forums-f68771d64ce689fe4e9300c88d5d53b0c685c6ef.tar.gz forums-f68771d64ce689fe4e9300c88d5d53b0c685c6ef.tar.bz2 forums-f68771d64ce689fe4e9300c88d5d53b0c685c6ef.tar.xz forums-f68771d64ce689fe4e9300c88d5d53b0c685c6ef.zip | |
- bugfixes
- do not hardcode url bbcode tag (please change the bitfield accordingly - see schema file!)
git-svn-id: file:///svn/phpbb/trunk@5063 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index a7d6d6f3fc..3e58394958 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -136,6 +136,12 @@ if ($sql) $topic_id = (int) $topic_id; $post_id = (int) $post_id; + // Global Topic? - Adjust forum id + if (!$forum_id && $topic_type == POST_GLOBAL) + { + $forum_id = request_var('f', 0); + } + $post_edit_locked = (isset($post_edit_locked)) ? (int) $post_edit_locked : 0; $user->setup(array('posting', 'mcp', 'viewtopic'), $forum_style); @@ -474,8 +480,8 @@ if ($draft_id && $user->data['user_id'] != ANONYMOUS && $auth->acl_get('u_savedr if ($row = $db->sql_fetchrow($result)) { - $_REQUEST['subject'] = $row['draft_subject']; - $_POST['message'] = $row['draft_message']; + $_REQUEST['subject'] = strtr($row['draft_subject'], array_flip(get_html_translation_table(HTML_ENTITIES))); + $_POST['message'] = strtr($row['draft_message'], array_flip(get_html_translation_table(HTML_ENTITIES))); $refresh = true; $template->assign_var('S_DRAFT_LOADED', true); } @@ -1452,17 +1458,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u } $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ? ', user_posts = user_posts + 1' : ''); - if (!$auth->acl_get('f_moderate', $data['forum_id'])) + + if ($topic_type == POST_GLOBAL) { - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1'; + if (!$auth->acl_get('f_moderate', $data['forum_id'])) + { + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1'; + } + $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? ', forum_topics = forum_topics + 1' : ''); } - $sql_data[FORUMS_TABLE]['stat'][] = 'forum_topics_real = forum_topics_real + 1' . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? ', forum_topics = forum_topics + 1' : ''); break; case 'reply': $sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . ((!$auth->acl_get('f_moderate', $data['forum_id'])) ? ', topic_replies = topic_replies + 1' : ''); $sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . (($auth->acl_get('f_postcount', $data['forum_id'])) ? ', user_posts = user_posts + 1' : ''); - if (!$auth->acl_get('f_moderate', $data['forum_id'])) + + if (!$auth->acl_get('f_moderate', $data['forum_id']) && $topic_type != POST_GLOBAL) { $sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts + 1'; } |
