}
//PEAR Pager begins at 1
$page = (int)$_GET['page'] - 1;
+
+ if ($page >= 100) {
+ //Elasticsearch by default only allows 100 pages
+ // we do not want exceptions in our logs
+ throw new Exception_Input('List page is too large');
+ }
}
$perPage = 10;//$GLOBALS['phinde']['perPage'];
$pager = new Html_Pager(
$res->hits->total, $perPage, $page + 1,
- $baseLink
+ buildLink($baseLink, $filters, null, null)
);
foreach ($res->hits->hits as &$hit) {
'sort' => $sort,
'urlSorts' => $urlSorts,
'hitTemplate' => 'search/' . $GLOBALS['phinde']['hitTemplate'],
+ 'sidebarinclude' => $GLOBALS['phinde']['sidebarinclude'],
)
);
?>