From e6e6be2b77e4ddfff79adfea4a7c65dce74807a8 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Sun, 16 Dec 2001 13:36:47 +0000 Subject: [PATCH] Fix view newest post error + missing mini post icon in posting preview git-svn-id: file:///svn/phpbb/trunk@1604 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/templates/subSilver/posting_preview.tpl | 2 +- phpBB/viewforum.php | 1 + phpBB/viewtopic.php | 9 +++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/phpBB/templates/subSilver/posting_preview.tpl b/phpBB/templates/subSilver/posting_preview.tpl index aa71b23c13..ac9ab3f3c0 100644 --- a/phpBB/templates/subSilver/posting_preview.tpl +++ b/phpBB/templates/subSilver/posting_preview.tpl @@ -4,7 +4,7 @@ {L_PREVIEW} - Post image icon{L_POSTED}: + Post image icon{L_POSTED}: {POST_DATE}     Post Subject: {POST_SUBJECT} diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index d9897fe8c8..62c5adeb68 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -512,6 +512,7 @@ if( $total_topics ) } } + $newest_post_img = "" if( $userdata['session_logged_in'] ) { if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) || diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 994aefdfd6..d66532772f 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -63,10 +63,11 @@ if( isset($HTTP_GET_VARS["view"]) && empty($HTTP_GET_VARS[POST_POST_URL]) ) if( $session_id ) { $sql = "SELECT p.post_id - FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s - WHERE topic_id = $topic_id - AND s.session_id = '$session_id' - AND p.post_time >= s.session_last_visit + FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u + WHERE s.session_id = '$session_id' + AND u.user_id = s.session_user_id + AND p.topic_id = $topic_id + AND p.post_time >= u.user_lastvisit ORDER BY p.post_time ASC LIMIT 1"; if( !$result = $db->sql_query($sql) )