From f7d188511333bc089ee3c2f708d83b76b382a718 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sat, 16 Feb 2008 21:24:49 +0000 Subject: [PATCH] Bugtracker #4304 - sort so searches in custom pages but not custom menus. Also fix bug in search.php on getip() --- e107_handlers/search/search_pages.php | 6 +++--- search.php | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/e107_handlers/search/search_pages.php b/e107_handlers/search/search_pages.php index 1ffafe2be..453829eff 100644 --- a/e107_handlers/search/search_pages.php +++ b/e107_handlers/search/search_pages.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_pages.php,v $ -| $Revision: 1.3 $ -| $Date: 2008-01-26 17:55:52 $ +| $Revision: 1.4 $ +| $Date: 2008-02-16 21:24:49 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -31,7 +31,7 @@ $search_fields = array('page_title', 'page_text'); $weights = array('1.2', '0.6'); $no_results = LAN_198; -$where = "page_class IN (".USERCLASS_LIST.") AND".$advanced_where; +$where = "page_class IN (".USERCLASS_LIST.") AND `page_theme` = '' AND".$advanced_where; $order = array('page_datestamp' => DESC); $table = "page"; diff --git a/search.php b/search.php index 3df11e8e5..9a344aa5d 100644 --- a/search.php +++ b/search.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/search.php,v $ -| $Revision: 1.7 $ -| $Date: 2007-07-03 19:25:49 $ +| $Revision: 1.8 $ +| $Date: 2008-02-16 21:24:49 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -37,7 +37,8 @@ $search_prefs = $sysprefs -> getArray('search_prefs'); // load search routines $search_info = array(); $auto_order = 1000; -function search_info($id, $type, $plug_require, $info='') { +function search_info($id, $type, $plug_require, $info='') +{ global $tp, $search_prefs, $auto_order; if (check_class($search_prefs[$type.'_handlers'][$id]['class'])) { if ($plug_require) { @@ -180,7 +181,7 @@ if (isset($_GET['q']) || isset($_GET['in']) || isset($_GET['ex']) || isset($_GET elseif ($search_prefs['time_restrict']) { $time = time() - $search_prefs['time_secs']; $query_check = $tp -> toDB($full_query); - $ip = getip(); + $ip = $e107->getip(); if ($sql -> db_Select("tmp", "tmp_ip, tmp_time, tmp_info", "tmp_info LIKE 'type_search%' AND tmp_ip='".$ip."'")) { $row = $sql -> db_Fetch(); if (($row['tmp_time'] > $time) && ($row['tmp_info'] != 'type_search '.$query_check)) {