From 1b64e411606168802ebc164a1b42c2c2bfb2d972 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 20 Sep 2009 12:32:27 +0000 Subject: although we do not use force_approved_state check it nevertheless for the message displayed to the user - bug #51325 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10166 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index b241da2eab..35b247cd9c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1121,13 +1121,13 @@ if ($submit || $preview || $refresh) // The last parameter tells submit_post if search indexer has to be run $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false); - if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote')) { $captcha->reset(); } + // Check the permissions for post approval. Moderators are not affected. - if (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) + if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) || !empty($post_data['force_approved_state'])) { meta_refresh(10, $redirect_url); $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD']; -- cgit v1.2.1 From 8da2b69e2b8d823346d6ccf214a1ef0584dc87df Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 20 Sep 2009 17:08:16 +0000 Subject: note correct username if post/topic get's removed if user is anonymous git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10170 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 35b247cd9c..9c46edd0e1 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1569,17 +1569,18 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data) ); $next_post_id = delete_post($forum_id, $topic_id, $post_id, $data); + $post_username = ($post_data['poster_id'] == ANONYMOUS && !empty($post_data['post_username'])) ? $post_data['post_username'] : $post_data['username']; if ($next_post_id === false) { - add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_data['username']); + add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_TOPIC', $post_data['topic_title'], $post_username); $meta_info = append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id"); $message = $user->lang['POST_DELETED']; } else { - add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_data['username']); + add_log('mod', $forum_id, $topic_id, 'LOG_DELETE_POST', $post_data['post_subject'], $post_username); $meta_info = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=$next_post_id") . "#p$next_post_id"; $message = $user->lang['POST_DELETED'] . '

' . sprintf($user->lang['RETURN_TOPIC'], '', ''); -- cgit v1.2.1 From de25ce87243aaa9d9310d36f189fc051975dc494 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 25 Sep 2009 08:41:47 +0000 Subject: Fix Bug #51835 - editing posts with attachments - regression from r9843 introduced in #48265 Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10186 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 9c46edd0e1..1c7cd95b81 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -742,28 +742,7 @@ if ($submit || $preview || $refresh) } // Parse Attachments - before checksum is calculated - if ($mode == 'edit') - { - $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh, false, $post_id, $topic_id); - if (sizeof($message_parser->attachment_data)) - { - // Update attachment indicators for post/topic having attachments now, as a precaution if the post does not get stored by submit - $sql = 'UPDATE ' . POSTS_TABLE . ' - SET post_attachment = 1 - WHERE post_id = ' . $post_id; - $db->sql_query($sql); - - $sql = 'UPDATE ' . TOPICS_TABLE . ' - SET topic_attachment = 1 - WHERE topic_id = ' . $topic_id; - $db->sql_query($sql); - } - } - else - { - $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh); - } - + $message_parser->parse_attachments('fileupload', $mode, $forum_id, $submit, $preview, $refresh); // Grab md5 'checksum' of new message $message_md5 = md5($message_parser->message); -- cgit v1.2.1