From cb88671638b016b4454fef121cbe623ed3490638 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 13 Sep 2009 15:04:21 +0000 Subject: fix #51235 - regression from 9843 for #48265 Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10142 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 72c101f7a3..be753dd5ea 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1510,6 +1510,8 @@ class parse_message extends bbcode_firstpass { $sql_ary['topic_id'] = $topic_id; } + set_config_count('upload_dir_size', $filedata['filesize'], true); + set_config_count('num_files', 1, true); } $db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); -- 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/includes/message_parser.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index be753dd5ea..3df582d640 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1345,7 +1345,7 @@ class parse_message extends bbcode_firstpass /** * Parse Attachments */ - function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false, $post_msg_id = 0, $topic_id = 0) + function parse_attachments($form_name, $mode, $forum_id, $submit, $preview, $refresh, $is_message = false) { global $config, $auth, $user, $phpbb_root_path, $phpEx, $db; @@ -1498,27 +1498,16 @@ class parse_message extends bbcode_firstpass 'filesize' => $filedata['filesize'], 'filetime' => $filedata['filetime'], 'thumbnail' => $filedata['thumbnail'], - 'is_orphan' => ($post_msg_id) ? 0 : 1, + 'is_orphan' => 1, 'in_message' => ($is_message) ? 1 : 0, 'poster_id' => $user->data['user_id'], ); - if ($post_msg_id) - { - $sql_ary['post_msg_id'] = $post_msg_id; - if ($topic_id) - { - $sql_ary['topic_id'] = $topic_id; - } - set_config_count('upload_dir_size', $filedata['filesize'], true); - set_config_count('num_files', 1, true); - } - $db->sql_query('INSERT INTO ' . ATTACHMENTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); $new_entry = array( 'attach_id' => $db->sql_nextid(), - 'is_orphan' => ($post_msg_id) ? 0 : 1, + 'is_orphan' => 1, 'real_filename' => $filedata['real_filename'], 'attach_comment'=> $this->filename_data['filecomment'], ); -- cgit v1.2.1