mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
inline attachment capability...
git-svn-id: file:///svn/phpbb/trunk@4819 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -197,7 +197,6 @@ if ($sql)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
|
||||
if ($poster_id == ANONYMOUS || !$poster_id)
|
||||
{
|
||||
$username = (in_array($mode, array('quote', 'edit', 'delete'))) ? trim($post_username) : '';
|
||||
@@ -561,6 +560,8 @@ if ($submit || $preview || $refresh)
|
||||
$refresh = true;
|
||||
}
|
||||
|
||||
// Parse Attachments - before checksum is calculated
|
||||
$message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
|
||||
|
||||
// Grab md5 'checksum' of new message
|
||||
$message_md5 = md5($message_parser->message);
|
||||
@@ -572,8 +573,6 @@ if ($submit || $preview || $refresh)
|
||||
$message_parser->parse($enable_html, $enable_bbcode, $enable_urls, $enable_smilies, $img_status, $flash_status, $quote_status);
|
||||
}
|
||||
|
||||
$message_parser->parse_attachments($mode, $post_id, $submit, $preview, $refresh);
|
||||
|
||||
if ($mode != 'edit' && !$preview && !$refresh && $config['flood_interval'] && !$auth->acl_get('f_ignoreflood', $forum_id))
|
||||
{
|
||||
// Flood check
|
||||
@@ -899,6 +898,19 @@ if ($enable_icons)
|
||||
}
|
||||
}
|
||||
|
||||
// Generate inline attachment select box
|
||||
if (sizeof($message_parser->attachment_data))
|
||||
{
|
||||
$s_inline_attachment_options = '';
|
||||
foreach ($message_parser->attachment_data as $i => $attachment)
|
||||
{
|
||||
|
||||
$s_inline_attachment_options .= '<option value="' . $i . '">' . $attachment['real_filename'] . '</option>';
|
||||
}
|
||||
|
||||
$template->assign_var('S_INLINE_ATTACHMENT_OPTIONS', $s_inline_attachment_options);
|
||||
}
|
||||
|
||||
// Topic type selection ... only for first post in topic.
|
||||
$topic_type_toggle = false;
|
||||
if ($mode == 'post' || ($mode == 'edit' && $post_id == $topic_first_post_id))
|
||||
@@ -1900,7 +1912,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
|
||||
WHERE post_id = ' . $data['post_id']);
|
||||
}
|
||||
|
||||
// Update Poll Tables and Attachment Entries
|
||||
// Update Poll Tables
|
||||
if ($poll['poll_options'])
|
||||
{
|
||||
$cur_poll_options = array();
|
||||
@@ -1950,7 +1962,8 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
|
||||
if (count($attach_data) && $data['post_id'] && in_array($mode, array('post', 'reply', 'quote', 'edit')))
|
||||
{
|
||||
$space_taken = $files_added = 0;
|
||||
foreach ($attach_data as $attach_row)
|
||||
|
||||
foreach ($attach_data as $pos => $attach_row)
|
||||
{
|
||||
if ($attach_row['attach_id'])
|
||||
{
|
||||
|
Reference in New Issue
Block a user