diff --git a/e107_handlers/search_class.php b/e107_handlers/search_class.php index 81cfd1193..06e6568a2 100644 --- a/e107_handlers/search_class.php +++ b/e107_handlers/search_class.php @@ -91,7 +91,7 @@ class e_search $sql = e107::getDb('search'); $tp = e107::getParser(); - if($handler == 'self') + if($handler == 'self') //v2 use 'compile' function inside e_search.php; { $handler = array($this,'compile'); } diff --git a/search.php b/search.php index 9e3e7b2b6..ff2b89e05 100644 --- a/search.php +++ b/search.php @@ -223,9 +223,9 @@ class search extends e_shortcode if (check_class($this->search_prefs[$type.'_handlers'][$id]['class'])) { - echo "
type = ".$this->search_prefs[$type.'_handlers'][$id]['class']; + // echo "
type = ".$this->search_prefs[$type.'_handlers'][$id]['class']; - print_a($this->search_prefs); + // print_a($this->search_prefs); if ($plug_require) { @@ -467,7 +467,6 @@ class search extends e_shortcode $search_prefs = $this->search_prefs; $result_flag = $this->result_flag; - foreach ($this->search_info as $key => $a) { if (isset($this->searchtype[$key]) || isset($this->searchtype['all'])) @@ -506,7 +505,18 @@ class search extends e_shortcode } - $parms = $results.",".$search_res.",".$_GET['r'].",".e_REQUEST_SELF."?q=".$_GET['q']."&t=".$key."&r=[FROM]"; + // $parms = $results.",".$search_res.",".$_GET['r'].",".e_REQUEST_SELF."?q=".$_GET['q']."&t=".$key."&r=[FROM]"; + + $nextprev = array( + 'total' => $results, + 'amount' => intval($search_res), + 'current' => intval($_GET['r']), + 'url' => urldecode(e_REQUEST_SELF."?q=".$_GET['q']."&t=".$key."&r=[FROM]"), + // 'caption' => false, + 'tmpl_prefix' =>'default' + ); + + $npParms = http_build_query($nextprev,false,'&'); $core_parms = array('r' => '', 'q' => '', 't' => '', 's' => ''); foreach ($_GET as $pparm_key => $pparm_value) @@ -520,7 +530,7 @@ class search extends e_shortcode } if ($results > $search_res) { - $nextprev = ($results > $search_res) ? $tp -> parseTemplate("{NEXTPREV={$parms}}") : ""; + $nextprev = ($results > $search_res) ? $tp -> parseTemplate("{NEXTPREV={$npParms}}") : ""; $text .= ""; } if ($results > 0) @@ -645,7 +655,7 @@ class search extends e_shortcode if ($perform_search) { - $this->result_flag = $_GET['r']; + $this->result_flag = intval($_GET['r']); } $query = trim($full_query);