Commit 14b3bc5f authored by rjsmelo's avatar rjsmelo

[ENH] Improve error message, when the custom search cache expires

parent b3f69f10
......@@ -33,7 +33,10 @@ class Services_Search_CustomSearchController
$cachelib = TikiLib::lib('cache');
$definition = $input->definition->word();
if (empty($definition) || ! $definition = $cachelib->getSerialized($definition, 'customsearch')) {
throw new Services_Exception(tra('Unfortunately, the search cache has expired. Please reload the page to start over.'));
$smarty = \TikiLib::lib('smarty');
$smarty->assign('url', $_SERVER['HTTP_REFERER']);
$value = $smarty->fetch('search_customsearch/cache_expired.tpl');
return array('html' => $value);
}
/** @var Search_Query $query */
......
{* $Id$ *}
<div class="clearfix"></div>
{remarksbox type="error" title="{tr}Cache Expired{/tr}" icon="bricks"}
<p>{tr}Unfortunately, the search cache has expired. Please <a href="{$url}">reload the page</a> to start over.{/tr}</p>
{/remarksbox}
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