1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

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
This commit is contained in:
Paul S. Owen
2001-12-16 13:36:47 +00:00
parent 9e9710dc21
commit e6e6be2b77
3 changed files with 7 additions and 5 deletions

View File

@@ -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) )