mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
Oops, forgot to commit search.php
git-svn-id: file:///svn/phpbb/trunk@1311 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f448cdf609
commit
6c5c2a0aba
1 changed files with 30 additions and 4 deletions
|
@ -247,7 +247,7 @@ if( $mode == "searchuser" )
|
|||
else if( $query_keywords != "" || $query_author != "" || $search_id )
|
||||
{
|
||||
|
||||
if( $query_keywords != "" || $query_author != "" || $search_id == "newposts" )
|
||||
if( $query_keywords != "" || $query_author != "" || $search_id == "newposts" || $search_id == "egosearch" || $search_id == "unanswered")
|
||||
{
|
||||
$synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
|
||||
$stopword_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
|
||||
|
@ -260,6 +260,24 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
|
|||
$sortby_dir = "DESC";
|
||||
}
|
||||
|
||||
if( $search_id == "egosearch" )
|
||||
{
|
||||
$query_author = $userdata['username'];
|
||||
$show_results = "topics";
|
||||
$search_time = 0;
|
||||
$sortby = 0;
|
||||
$sortby_dir = "DESC";
|
||||
}
|
||||
|
||||
if( $search_id == "unanswered" )
|
||||
{
|
||||
$show_results = "topics";
|
||||
$search_time = 0;
|
||||
$sortby = 0;
|
||||
$sortby_dir = "DESC";
|
||||
}
|
||||
|
||||
|
||||
$cleaned_search = clean_words_search($query_keywords);
|
||||
$cleaned_search = remove_stop_words($cleaned_search, $stopword_array);
|
||||
$cleaned_search = replace_synonyms($cleaned_search, $synonym_array);
|
||||
|
@ -440,6 +458,14 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Unanswered Posts
|
||||
//
|
||||
if( $search_id == "unanswered" )
|
||||
{
|
||||
$search_sql .= ( $search_sql == "" ) ? "t.topic_replies = 0 " : "AND t.topic_replies = 0 ";
|
||||
}
|
||||
|
||||
//
|
||||
// If user is logged in then we'll
|
||||
// check to see which (if any) private
|
||||
|
@ -449,7 +475,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
|
|||
// If not logged in we explicitly prevent
|
||||
// searching of private forums
|
||||
//
|
||||
if( $search_sql != "" || $search_id == "newposts" )
|
||||
if( $search_sql != "" || $search_id == "newposts" || $search_id == "egosearch" || $search_id == "unanswered" )
|
||||
{
|
||||
$sql = "SELECT $sql_fields
|
||||
FROM $sql_from ";
|
||||
|
@ -837,7 +863,6 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
|
|||
$message = preg_replace($search_string, $replace_string, $message);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_block_vars("searchresults", array(
|
||||
"TOPIC_TITLE" => $topic_title,
|
||||
"FORUM_NAME" => $searchset[$i]['forum_name'],
|
||||
|
@ -858,6 +883,7 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
|
|||
{
|
||||
$message = "";
|
||||
|
||||
|
||||
if( count($orig_word) )
|
||||
{
|
||||
$topic_title = preg_replace($orig_word, $replacement_word, $searchset[$i]['topic_title']);
|
||||
|
|
Loading…
Add table
Reference in a new issue