Project

General

Profile

Feature #20421 ยป class.tx_indexedsearch.patch

Administrator Admin, 2009-05-14 15:43

View differences:

class.tx_indexedsearch.php 2009-05-11 12:00:30.000000000 +0200
$this->internal['results_at_a_time'] = $this->piVars['results'];
$this->internal['maxPages'] = t3lib_div::intInRange($this->conf['search.']['page_links'],1,100,10);
$addString = ($resData['count']&&$this->piVars['group']=='sections'&&$freeIndexUid<=0 ? ' '.sprintf($this->pi_getLL(count($this->resultSections)>1?'inNsections':'inNsection'),count($this->resultSections)):'');
$browseBox1 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
$browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid);
# CLX/ADIT: Possiblity to turn off result browser
#$browseBox1 = $this->pi_list_browseresults(1,$addString,$this->printResultSectionLinks(),$freeIndexUid);
#$browseBox2 = $this->pi_list_browseresults(0,'','',$freeIndexUid);
$browseBox1 = $this->pi_list_browseresults($this->conf['show.']['resultBrowserTop.']['showResultCount'],$addString,$this->printResultSectionLinks(),$freeIndexUid,$this->conf['show.']['resultBrowserTop.']['showResultBrowser']);
$browseBox2 = $this->pi_list_browseresults($this->conf['show.']['resultBrowserBottom.']['showResultCount'],'','',$freeIndexUid,$this->conf['show.']['resultBrowserBottom.']['showResultBrowser']);
}
// Browsing nav, bottom.
if ($resData['count']) {
$content = $browseBox1.$rowcontent.$browseBox2;
......
* @param string List of integers pointing to free indexing configurations to search. -1 represents no filtering, 0 represents TYPO3 pages only, any number above zero is a uid of an indexing configuration!
* @return string HTML output
*/
function pi_list_browseresults($showResultCount=1,$addString='',$addPart='',$freeIndexUid=-1) {
function pi_list_browseresults($showResultCount=1,$addString='',$addPart='',$freeIndexUid=-1, $showResultBrowser=1) {
// Initializing variables:
$pointer=$this->piVars['pointer'];
$count=$this->internal['res_count'];
$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);
$maxPages = t3lib_div::intInRange($this->internal['maxPages'],1,100);
$pageCount = ceil($count/$results_at_a_time);
# CLX/ADIT: Possiblity to turn off result browser
#$pageCount = ceil($count/$results_at_a_time);
if($showResultBrowser) {
$pageCount = ceil($count/$results_at_a_time);
} else {
$pageCount = 0;
}
$sTables = '';
if ($pageCount > 1) { // only show the result browser if more than one page is needed
$pointer=intval($pointer);
$links=array();
    (1-1/1)