aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-11-14 06:39:17 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-11-14 06:39:17 +0000
commit6c5c2a0abafa4bc01983424cdd58c13bb24b9d13 (patch)
tree14796d1226a8c1035636944f48ecd1048103949d /phpBB/search.php
parentf448cdf609e172758c0c22477d639762c7ebdfce (diff)
downloadforums-6c5c2a0abafa4bc01983424cdd58c13bb24b9d13.tar
forums-6c5c2a0abafa4bc01983424cdd58c13bb24b9d13.tar.gz
forums-6c5c2a0abafa4bc01983424cdd58c13bb24b9d13.tar.bz2
forums-6c5c2a0abafa4bc01983424cdd58c13bb24b9d13.tar.xz
forums-6c5c2a0abafa4bc01983424cdd58c13bb24b9d13.zip
Oops, forgot to commit search.php
git-svn-id: file:///svn/phpbb/trunk@1311 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php34
1 files changed, 30 insertions, 4 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index da5076f8b3..79169a5924 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -122,7 +122,7 @@ else
$query_keywords = "";
}
-if( isset($HTTP_POST_VARS['search_author']) || isset($HTTP_GET_VARS['search_author']) )
+if( isset($HTTP_POST_VARS['search_author']) || isset($HTTP_GET_VARS['search_author']))
{
$query_author = ( isset($HTTP_POST_VARS['search_author']) ) ? $HTTP_POST_VARS['search_author'] : $HTTP_GET_VARS['search_author'];
}
@@ -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");
@@ -259,6 +259,24 @@ else if( $query_keywords != "" || $query_author != "" || $search_id )
$sortby = 0;
$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);
@@ -441,6 +459,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
// forums they are allowed to view and
@@ -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']);