mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Bugtracker #4304 - sort so searches in custom pages but not custom menus. Also fix bug in search.php on getip()
This commit is contained in:
parent
62fbbb4976
commit
f7d1885113
@ -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";
|
||||
|
||||
|
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user