aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_queue.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2007-01-27 16:04:58 +0000
committerNils Adermann <naderman@naderman.de>2007-01-27 16:04:58 +0000
commitaa8ebc7bf3126e21b07fffffb50ac49fc7215fad (patch)
tree76680ebd31a4163a77a09319b71d91f048bc2c00 /phpBB/includes/mcp/mcp_queue.php
parent14e209a487abc134812147907ef4e03d2850a767 (diff)
downloadforums-aa8ebc7bf3126e21b07fffffb50ac49fc7215fad.tar
forums-aa8ebc7bf3126e21b07fffffb50ac49fc7215fad.tar.gz
forums-aa8ebc7bf3126e21b07fffffb50ac49fc7215fad.tar.bz2
forums-aa8ebc7bf3126e21b07fffffb50ac49fc7215fad.tar.xz
forums-aa8ebc7bf3126e21b07fffffb50ac49fc7215fad.zip
- introducing read/unread images in the MCP, if you view something through the MCP it will not update the "read" status of a post/topic/forum [includes Bug #6796]
git-svn-id: file:///svn/phpbb/trunk@6936 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r--phpBB/includes/mcp/mcp_queue.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index b8619e6f84..6378295191 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -82,7 +82,7 @@ class mcp_queue
}
}
- $post_info = get_post_data(array($post_id), 'm_approve');
+ $post_info = get_post_data(array($post_id), 'm_approve', true);
if (!sizeof($post_info))
{
@@ -99,6 +99,21 @@ class mcp_queue
);
}
+ $topic_tracking_info = array();
+ // Get topic tracking info
+ if ($config['load_db_lastread'])
+ {
+ $tmp_topic_data = array($post_info['topic_id'] => $post_info);
+ $topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
+ unset($tmp_topic_data);
+ }
+ else
+ {
+ $topic_tracking_info = get_complete_topic_tracking($post_info['forum_id'], $post_info['topic_id']);
+ }
+
+ $post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
+
// Process message, leave it uncensored
$message = $post_info['post_text'];
$message = str_replace("\n", '<br />', $message);
@@ -130,6 +145,8 @@ class mcp_queue
'U_VIEW_POST' => $post_url,
'U_VIEW_TOPIC' => $topic_url,
+ 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
+
'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&amp;mode=unapproved_topics' : '&amp;mode=unapproved_posts')) . "&amp;start=$start\">", '</a>'),
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'),