forked from extern/egroupware
added new function to format the number of items
This commit is contained in:
parent
af9aa6e383
commit
15f2a238e7
@ -439,5 +439,36 @@
|
|||||||
. "qfield=$qfield&start=$start" . $extra) . '">' . $text . '</a>';
|
. "qfield=$qfield&start=$start" . $extra) . '">' . $text . '</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function show_hits($total_records = '',$start)
|
||||||
|
{
|
||||||
|
global $phpgw_info, $start;
|
||||||
|
|
||||||
|
if ($phpgw_info['user']['preferences']['common']['maxmatchs'] && $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0)
|
||||||
|
{
|
||||||
|
$limit = $phpgw_info['user']['preferences']['common']['maxmatchs'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$limit = 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($total_records > $limit)
|
||||||
|
{
|
||||||
|
if ($start + $limit > $total_records)
|
||||||
|
{
|
||||||
|
$end = $total_records;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$end = $start + $limit;
|
||||||
|
}
|
||||||
|
$f = lang('showing x - x of x',($start + 1),$end,$total_records);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$f = lang('showing x',$total_records);
|
||||||
|
}
|
||||||
|
return $f;
|
||||||
|
}
|
||||||
} // End of nextmatchs class
|
} // End of nextmatchs class
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user