From f06057e929a1a286aea63585ac90e0323857a06f Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Wed, 10 Oct 2001 23:18:13 +0000 Subject: [PATCH] I seem to have modified copies of these, so I'm comming 'em just in case git-svn-id: file:///svn/phpbb/trunk@1161 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index f58133b066..7fd23c2f95 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -419,6 +419,8 @@ obtain_word_list($orig_word, $replacement_word); // // Dump out the page header and load viewtopic body template // +$topic_last_read = ( isset($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id]) ) ? $HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id] : 0; + setcookie('phpbb2_' . $forum_id . '_' . $topic_id, time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); $page_title = $lang['View_topic'] ." - $topic_title"; @@ -675,7 +677,7 @@ for($i = 0; $i < $total_posts; $i++) // // Define the little post icon // - if( $postrow[$i]['post_time'] > $userdata['session_last_visit'] && $postrow[$i]['post_time'] > $HTTP_COOKIE_VAR['phpbb2_' . $forum_id . '_' . $topic_id]) + if( $postrow[$i]['post_time'] > $userdata['session_last_visit'] && $postrow[$i]['post_time'] > $topic_last_read ) { $mini_post_img = '' . $lang['New_post'] . ''; } @@ -806,12 +808,20 @@ for($i = 0; $i < $total_posts; $i++) { $ip_img = "\"""; - $delpost_img = "\"""; + $delpost_img = "\"""; } else { $ip_img = ""; - $delpost_img = ""; + + if( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $i == $total_replies - 1 ) + { + $delpost_img = "\"""; + } + else + { + $delpost_img = ""; + } } $post_subject = ( $postrow[$i]['post_subject'] != "" ) ? $postrow[$i]['post_subject'] : ""; @@ -913,8 +923,8 @@ for($i = 0; $i < $total_posts; $i++) "EDIT_IMG" => $edit_img, "QUOTE_IMG" => $quote_img, "PMSG_IMG" => $pmsg_img, - "IP_IMG" => $ip_img, - "DELPOST_IMG" => $delpost_img, + "IP_IMG" => $ip_img, + "DELETE_IMG" => $delpost_img, "U_POST_ID" => $postrow[$i]['post_id']) );