Commit 2f61fbe5 authored by lphuberdeau's avatar lphuberdeau

[FIX] Pass around the values to display the filter form correctly

parent 23abf895
......@@ -207,7 +207,7 @@ class ObjectLib extends TikiLib
$info = $this->get_info($type, $id);
if ($info) {
if (isset($info['title'])) {
return $info['title'];
}
}
......
......@@ -23,6 +23,9 @@ function smarty_block_filter($params, $content, &$smarty, $repeat) {
$types = $unifiedsearchlib->getSupportedTypes();
$filter = isset($_REQUEST['filter']) ? $_REQUEST['filter'] : array();
if (isset($params['filter'])) {
$filter = array_merge($filter, $params['filter']);
}
// General
$smarty->assign('filter_action', $params['action']);
......
......@@ -58,7 +58,7 @@ close();
{if $prefs.feature_search_fulltext eq 'y'}
{include file='tiki-searchresults.tpl' searchNoResults="false" searchStyle="menu" searchOrientation="horiz" words="$page"}
{else}
{include file='tiki-searchindex.tpl' searchNoResults="true" searchStyle="menu" searchOrientation="horiz" words="$page"}
{include file='tiki-searchindex.tpl' searchNoResults="true" searchStyle="menu" searchOrientation="horiz" words="$page" filter=$filter}
{/if}
{/if}
{if $prefs.feature_likePages ne 'y' and !($prefs.feature_search eq 'y' && $tiki_p_search eq 'y')}
......
......@@ -12,7 +12,7 @@
{/if}
{if $prefs.feature_search_show_search_box eq 'y'}
{filter action="tiki-searchindex.php"}{/filter}
{filter action="tiki-searchindex.php" filter=$filter}{/filter}
{/if}
</div><!--nohighlight-->
{* do not change the comment above, since smarty 'highlight' outputfilter is hardcoded to find exactly this... instead you may experience white pages as results *}
......
......@@ -278,6 +278,9 @@ if(empty($info) && !($user && $prefs['feature_wiki_userpage'] == 'y' && strcasec
}
$smarty->assign_by_ref('likepages', $likepages);
$smarty->assign('create', $isUserPage? 'n': 'y');
$smarty->assign('filter', array(
'content' => $page,
));
$access->display_error( $page, tra('Page cannot be found'), '404' );
}
......
......@@ -92,6 +92,8 @@ if (count($filter)) {
}
}
$smarty->assign('filter', $filter);
// disallow robots to index page:
$smarty->assign('metatag_robots', 'NOINDEX, NOFOLLOW');
$smarty->assign('mid', 'tiki-searchindex.tpl');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment