aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-12-24 13:11:54 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-12-24 13:11:54 +0000
commitae1cb0316e6c19d62f0579e9cef52f11df081bcf (patch)
treed5e0900486aeb6ac91b957ce2ac47a4d55cdddc7 /phpBB/posting.php
parent9cc0b364bcc9473d0b1f4656db9008a55921918b (diff)
downloadforums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar
forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.gz
forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.bz2
forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.xz
forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.zip
some fixes today
- most important change is the consolidation of the display attachment functions; merging them together to have one function we need to call. git-svn-id: file:///svn/phpbb/trunk@6803 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php15
1 files changed, 5 insertions, 10 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index b05c051549..1afd964b38 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -39,7 +39,7 @@ $load = (isset($_POST['load'])) ? true : false;
$delete = (isset($_POST['delete'])) ? true : false;
$cancel = (isset($_POST['cancel']) && !isset($_POST['save'])) ? true : false;
-$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['edit_comment']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
+$refresh = (isset($_POST['add_file']) || isset($_POST['delete_file']) || isset($_POST['cancel_unglobalise']) || $save || $load) ? true : false;
$mode = ($delete && !$preview && !$refresh && $submit) ? 'delete' : request_var('mode', '');
$error = $post_data = array();
@@ -733,7 +733,7 @@ if ($submit || $preview || $refresh)
}
// Parse subject
- if (!$refresh && !$post_data['post_subject'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
+ if (!$preview && !$refresh && !$post_data['post_subject'] && ($mode == 'post' || ($mode == 'edit' && $post_data['topic_first_post_id'] == $post_id)))
{
$error[] = $user->lang['EMPTY_SUBJECT'];
}
@@ -999,17 +999,12 @@ if (!sizeof($error) && $preview)
// Attachment Preview
if (sizeof($message_parser->attachment_data))
{
- $extensions = $update_count = array();
-
$template->assign_var('S_HAS_ATTACHMENTS', true);
+ $update_count = array();
$attachment_data = $message_parser->attachment_data;
- $unset_attachments = parse_inline_attachments($preview_message, $attachment_data, $update_count, $forum_id, true);
- foreach ($unset_attachments as $index)
- {
- unset($attachment_data[$index]);
- }
+ parse_attachments($forum_id, $preview_message, $attachment_data, $update_count, true);
foreach ($attachment_data as $i => $attachment)
{
@@ -1017,7 +1012,7 @@ if (!sizeof($error) && $preview)
'DISPLAY_ATTACHMENT' => $attachment)
);
}
- unset($attachment_data, $attachment);
+ unset($attachment_data);
}
if (!sizeof($error))