diff --git a/phpBB/search.php b/phpBB/search.php index 1444712570..179cd83ac2 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -759,7 +759,6 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) { $forum_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $searchset[$i]['forum_id']); $topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $searchset[$i]['topic_id'] . "&highlight=$highlight_active"); - $poster_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $searchset[$i]['user_id']); $post_url = append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $searchset[$i]['post_id'] . "&highlight=$highlight_active#" . $searchset[$i]['post_id']); $post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']); @@ -839,6 +838,10 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) } + $poster = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? "" : ""; + $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] : $lang['Guest'] ); + $poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? "" : ""; + if( $userdata['session_logged_in'] && $searchset[$i]['post_time'] > $userdata['user_lastvisit'] ) { if( !empty($tracking_topics['' . $topic_id . '']) && !empty($tracking_forums['' . $forum_id . '']) ) @@ -869,7 +872,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) "FORUM_NAME" => $searchset[$i]['forum_name'], "POST_SUBJECT" => $post_subject, "POST_DATE" => $post_date, - "POSTER_NAME" => $searchset[$i]['username'], + "POSTER_NAME" => $poster, "TOPIC_REPLIES" => $searchset[$i]['topic_replies'], "TOPIC_VIEWS" => $searchset[$i]['topic_views'], "MESSAGE" => $message, @@ -878,8 +881,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) "U_POST" => $post_url, "U_TOPIC" => $topic_url, - "U_FORUM" => $forum_url, - "U_USER_PROFILE" => $poster_url) + "U_FORUM" => $forum_url) ); } else @@ -1064,15 +1066,17 @@ else if( $query_keywords != "" || $query_author != "" || $search_id ) } } - $topic_poster = $searchset[$i]['username']; + $topic_poster = ( $searchset[$i]['user_id'] != ANONYMOUS ) ? "" : ""; + $topic_poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] : $lang['Guest'] ); + $topic_poster .= ( $searchset[$i]['user_id'] != ANONYMOUS ) ? "" : ""; $last_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']); $last_post_user = ( $searchset[$i]['id2'] == ANONYMOUS && $searchset[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $searchset[$i]['user2']; - $last_post = $last_post_time . "
" . $lang['by'] . " "; - $last_post .= "" . $last_post_user . " "; - $last_post .= "\"""; + $last_post = $last_post_time . "
"; + $last_post .= ( $searchset[$i]['id2'] == ANONYMOUS ) ? ( ($searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] . " " : $lang['Guest'] . " " ) : "" . $searchset[$i]['user2'] . " "; + $last_post .= "\"""; $template->assign_block_vars("searchresults", array( "FORUM_NAME" => $searchset[$i]['forum_name'], diff --git a/phpBB/templates/subSilver/search_results_posts.tpl b/phpBB/templates/subSilver/search_results_posts.tpl index 0066efbaa5..04ac4396ea 100644 --- a/phpBB/templates/subSilver/search_results_posts.tpl +++ b/phpBB/templates/subSilver/search_results_posts.tpl @@ -21,7 +21,7 @@   {L_TOPIC}: {searchresults.TOPIC_TITLE} - {searchresults.POSTER_NAME}
+ {searchresults.POSTER_NAME}

{L_REPLIES}: {searchresults.TOPIC_REPLIES}
{L_VIEWS}: {searchresults.TOPIC_VIEWS}

diff --git a/phpBB/templates/subSilver/search_results_topics.tpl b/phpBB/templates/subSilver/search_results_topics.tpl index 2c1c08c509..1c4b84f550 100644 --- a/phpBB/templates/subSilver/search_results_topics.tpl +++ b/phpBB/templates/subSilver/search_results_topics.tpl @@ -26,7 +26,7 @@ {searchresults.FOLDER} {searchresults.FORUM_NAME} {searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE}
{searchresults.GOTO_PAGE} - {searchresults.TOPIC_POSTER} + {searchresults.TOPIC_POSTER} {searchresults.REPLIES} {searchresults.VIEWS} {searchresults.LAST_POST}