mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Search now using default nextprev template. Debug info removed.
This commit is contained in:
parent
3d78256104
commit
7deb681e68
@ -91,7 +91,7 @@ class e_search
|
|||||||
$sql = e107::getDb('search');
|
$sql = e107::getDb('search');
|
||||||
$tp = e107::getParser();
|
$tp = e107::getParser();
|
||||||
|
|
||||||
if($handler == 'self')
|
if($handler == 'self') //v2 use 'compile' function inside e_search.php;
|
||||||
{
|
{
|
||||||
$handler = array($this,'compile');
|
$handler = array($this,'compile');
|
||||||
}
|
}
|
||||||
|
22
search.php
22
search.php
@ -223,9 +223,9 @@ class search extends e_shortcode
|
|||||||
|
|
||||||
if (check_class($this->search_prefs[$type.'_handlers'][$id]['class']))
|
if (check_class($this->search_prefs[$type.'_handlers'][$id]['class']))
|
||||||
{
|
{
|
||||||
echo "<br />type = ".$this->search_prefs[$type.'_handlers'][$id]['class'];
|
// echo "<br />type = ".$this->search_prefs[$type.'_handlers'][$id]['class'];
|
||||||
|
|
||||||
print_a($this->search_prefs);
|
// print_a($this->search_prefs);
|
||||||
|
|
||||||
if ($plug_require)
|
if ($plug_require)
|
||||||
{
|
{
|
||||||
@ -467,7 +467,6 @@ class search extends e_shortcode
|
|||||||
$search_prefs = $this->search_prefs;
|
$search_prefs = $this->search_prefs;
|
||||||
$result_flag = $this->result_flag;
|
$result_flag = $this->result_flag;
|
||||||
|
|
||||||
|
|
||||||
foreach ($this->search_info as $key => $a)
|
foreach ($this->search_info as $key => $a)
|
||||||
{
|
{
|
||||||
if (isset($this->searchtype[$key]) || isset($this->searchtype['all']))
|
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' => '');
|
$core_parms = array('r' => '', 'q' => '', 't' => '', 's' => '');
|
||||||
foreach ($_GET as $pparm_key => $pparm_value)
|
foreach ($_GET as $pparm_key => $pparm_value)
|
||||||
@ -520,7 +530,7 @@ class search extends e_shortcode
|
|||||||
}
|
}
|
||||||
if ($results > $search_res)
|
if ($results > $search_res)
|
||||||
{
|
{
|
||||||
$nextprev = ($results > $search_res) ? $tp -> parseTemplate("{NEXTPREV={$parms}}") : "";
|
$nextprev = ($results > $search_res) ? $tp -> parseTemplate("{NEXTPREV={$npParms}}") : "";
|
||||||
$text .= "<div class='nextprev search form-inline'>".$nextprev."</div>";
|
$text .= "<div class='nextprev search form-inline'>".$nextprev."</div>";
|
||||||
}
|
}
|
||||||
if ($results > 0)
|
if ($results > 0)
|
||||||
@ -645,7 +655,7 @@ class search extends e_shortcode
|
|||||||
|
|
||||||
if ($perform_search)
|
if ($perform_search)
|
||||||
{
|
{
|
||||||
$this->result_flag = $_GET['r'];
|
$this->result_flag = intval($_GET['r']);
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = trim($full_query);
|
$query = trim($full_query);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user