mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
oh my god - what did he do? Adding attachment display to post/topic review, queue, reports, post details, mcp topic view... fixing other tiny things along the line.
git-svn-id: file:///svn/phpbb/trunk@7642 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -25,7 +25,7 @@ class mcp_queue
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $auth, $db, $user, $template;
|
||||
global $auth, $db, $user, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $action;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
@@ -101,7 +101,8 @@ class mcp_queue
|
||||
);
|
||||
}
|
||||
|
||||
$topic_tracking_info = array();
|
||||
$extensions = $attachments = $topic_tracking_info = array();
|
||||
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
{
|
||||
@@ -127,6 +128,43 @@ class mcp_queue
|
||||
}
|
||||
$message = smiley_text($message);
|
||||
|
||||
if ($post_info['post_attachment'] && $auth->acl_get('u_download') && $auth->acl_get('f_download', $post_info['forum_id']))
|
||||
{
|
||||
$extensions = $cache->obtain_attach_extensions($post_info['forum_id']);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE post_msg_id = ' . $post_id . '
|
||||
AND in_message = 0
|
||||
ORDER BY filetime DESC, post_msg_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$attachments[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($attachments))
|
||||
{
|
||||
$update_count = array();
|
||||
parse_attachments($post_info['forum_id'], $message, $attachments, $update_count);
|
||||
}
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
if (!empty($attachments))
|
||||
{
|
||||
$template->assign_var('S_HAS_ATTACHMENTS', true);
|
||||
|
||||
foreach ($attachments as $attachment)
|
||||
{
|
||||
$template->assign_block_vars('attachment', array(
|
||||
'DISPLAY_ATTACHMENT' => $attachment)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']);
|
||||
$topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']);
|
||||
|
||||
@@ -165,9 +203,11 @@ class mcp_queue
|
||||
'POST_SUBJECT' => $post_info['post_subject'],
|
||||
'POST_DATE' => $user->format_date($post_info['post_time']),
|
||||
'POST_IP' => $post_info['poster_ip'],
|
||||
'POST_IPADDR' => @gethostbyaddr($post_info['poster_ip']),
|
||||
'POST_ID' => $post_info['post_id'])
|
||||
);
|
||||
'POST_IPADDR' => ($auth->acl_get('m_info', $post_info['forum_id']) && request_var('lookup', '')) ? @gethostbyaddr($post_info['poster_ip']) : '',
|
||||
'POST_ID' => $post_info['post_id'],
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id . '&lookup=' . $post_info['poster_ip']) . '#ip' : '',
|
||||
));
|
||||
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user