1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-24 16:31:48 +02:00

Bugtracker #3949 - mySQL requires at least 4 characters for search

This commit is contained in:
e107steved
2007-05-18 21:14:52 +00:00
parent c3559b5729
commit 44eaed03dc
2 changed files with 11 additions and 8 deletions

View File

@@ -4,8 +4,8 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/lan_search.php,v $
| $Revision: 1.2 $
| $Date: 2007-04-24 20:20:17 $
| $Revision: 1.3 $
| $Date: 2007-05-18 21:14:52 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -25,7 +25,7 @@ define("LAN_198", "No matches found");
define("LAN_199", "Search For:");
define("LAN_416", "You must be logged in to access this page");
define("LAN_417", "Search terms must be at least 3 characters.");
define("LAN_417", "Search terms must be at least --CHARS-- characters.");
define("LAN_418", "Other Pages");

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/search.php,v $
| $Revision: 1.5 $
| $Date: 2007-04-24 20:20:10 $
| $Revision: 1.6 $
| $Date: 2007-05-18 21:14:52 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
*/
@@ -171,10 +171,13 @@ if (isset($_GET['q']) || isset($_GET['in']) || isset($_GET['ex']) || isset($_GET
} else if (strlen($full_query) == 0) {
$perform_search = false;
$SEARCH_MESSAGE = LAN_SEARCH_201;
} else if (strlen($full_query) < 3) {
}
elseif (strlen($full_query) < ($char_count = ($search_prefs['mysql_sort'] ? 4 : 3)))
{
$perform_search = false;
$SEARCH_MESSAGE = LAN_417;
} else if ($search_prefs['time_restrict']) {
$SEARCH_MESSAGE = str_replace('--CHARS--', $char_count, LAN_417);
}
elseif ($search_prefs['time_restrict']) {
$time = time() - $search_prefs['time_secs'];
$query_check = $tp -> toDB($full_query);
$ip = getip();