diff --git a/phpBB/search.php b/phpBB/search.php
index 4662c1f185..287b6e82d1 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -21,8 +21,7 @@
***************************************************************************/
//
-// Massive overhaul for phpBB2,
-// originally based on search code
+// Massive overhaul for phpBB2, originally based on search code
// I knocked together for my own website
//
// PSO : 2001
@@ -38,8 +37,8 @@ include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
function gensearch_sql($searchstring, $override_all = 0)
{
- $searchchars = array("'[\s]+'", "'\/'", "';'", "'@'", "'&'", "'#'", "'_'", "'|'", "'¬'", "'\*'");
- $replacechars = array(" ", "", "", "", " ", "", "", "", " ", "", "%");
+ $searchchars = array("'[\s]+'", "'\/'", "';'", "'@'", "'#'", "'_'", "'|'", "'¬'", "'\*'");
+ $replacechars = array(" ", "", "", "", " ", "", "", " ", "", "%");
$searchstring = trim(preg_replace($searchchars, $replacechars, strip_tags($searchstring)));
@@ -194,7 +193,7 @@ function gensearch_sql($searchstring, $override_all = 0)
}
$findword = $searchlistandtype["AND"][$j];
- $searchstring .= " ( pt.post_text LIKE '% $findword %')";
+ $searchstring .= " ( pt.post_text LIKE '$findword')";
}// OR pt.post_text LIKE '$findword %' OR pt.post_text LIKE '% $findword'
}
elseif($binsearchtype[$i] == "OR" && count($searchlistandtype["OR"]))
@@ -211,7 +210,7 @@ function gensearch_sql($searchstring, $override_all = 0)
}
$findword = $searchlistandtype["OR"][$j];
- $searchstring .= " ( pt.post_text LIKE '% $findword %' )";
+ $searchstring .= " ( pt.post_text LIKE '$findword' )";
}// OR pt.post_text LIKE '$findword %' OR pt.post_text LIKE '% $findword'
}
elseif($binsearchtype[$i] == "NOT" && count($searchlistandtype["NOT"]))
@@ -254,7 +253,7 @@ function gensearch_sql($searchstring, $override_all = 0)
}
}
- $searchstring = "($searchstring)";
+ $searchstring = "( $searchstring )";
$searchdata[0] = $searchstring;
for($i = 0; $i < count($searchforwords); $i++)
@@ -939,6 +938,15 @@ if( $query_keywords != "" || $query_author != "" || $search_id )
}
}
+ if($searchset[$i]['post_time'] >= $userdata['session_last_visit'])
+ {
+ $newest_post_img = "
";
+ }
+ else
+ {
+ $newest_post_img = "";
+ }
+
$topic_poster = $searchset[$i]['username'];
$last_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
@@ -963,6 +971,7 @@ if( $query_keywords != "" || $query_author != "" || $search_id )
"FORUM_ID" => $forum_id,
"TOPIC_ID" => $topic_id,
"FOLDER" => $folder_image,
+ "NEWEST_POST_IMG" => $newest_post_img,
"TOPIC_POSTER" => $topic_poster,
"GOTO_PAGE" => $goto_page,
"REPLIES" => $replies,
diff --git a/phpBB/templates/PSO/search_results_topics.tpl b/phpBB/templates/PSO/search_results_topics.tpl
index f63f825066..7ffb190dfd 100644
--- a/phpBB/templates/PSO/search_results_topics.tpl
+++ b/phpBB/templates/PSO/search_results_topics.tpl
@@ -1,7 +1,7 @@
@@ -9,7 +9,7 @@
- {L_SEARCH} - {SEARCH_MATCHES} Matches |
+ {L_SEARCH} {L_FOUND} {SEARCH_MATCHES} {L_MATCHES} |
|
@@ -24,22 +24,17 @@
{searchresults.FOLDER} |
{searchresults.FORUM_NAME} |
- {searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE} {searchresults.GOTO_PAGE} |
+ {searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE} {searchresults.GOTO_PAGE} |
{searchresults.REPLIES} |
{searchresults.TOPIC_POSTER} |
{searchresults.VIEWS} |
{searchresults.LAST_POST} |
-
-
- {L_NO_TOPICS} |
-
-
- {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES} |
+ {L_PAGE} {ON_PAGE} {L_OF} {TOTAL_PAGES} |
{PAGINATION} |
|
@@ -55,4 +50,4 @@
{S_TIMEZONE} |
{JUMPBOX} |
-
\ No newline at end of file
+
diff --git a/phpBB/templates/subSilver/search_results_topics.tpl b/phpBB/templates/subSilver/search_results_topics.tpl
index cd9b1b32a8..8b979c9055 100644
--- a/phpBB/templates/subSilver/search_results_topics.tpl
+++ b/phpBB/templates/subSilver/search_results_topics.tpl
@@ -31,7 +31,7 @@
|
{searchresults.FOLDER} |
{searchresults.FORUM_NAME} |
- {searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE} {searchresults.GOTO_PAGE} |
+ {searchresults.NEWEST_POST_IMG}{searchresults.TOPIC_TYPE}{searchresults.TOPIC_TITLE} {searchresults.GOTO_PAGE} |
{searchresults.REPLIES} |
{searchresults.TOPIC_POSTER} |
{searchresults.VIEWS} |