mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
added new function to format the number of items
This commit is contained in:
parent
99efbc2607
commit
b1093ff7e1
@ -28,6 +28,20 @@
|
|||||||
*/
|
*/
|
||||||
class nextmatchs
|
class nextmatchs
|
||||||
{
|
{
|
||||||
|
function nextmatchs()
|
||||||
|
{
|
||||||
|
global $phpgw_info;
|
||||||
|
|
||||||
|
if ($phpgw_info['user']['preferences']['common']['maxmatchs'] && $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0)
|
||||||
|
{
|
||||||
|
$this->maxmatchs = intval($phpgw_info['user']['preferences']['common']['maxmatchs']);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->maxmatchs = 15;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@function set_icon
|
@function set_icon
|
||||||
@abstract ?
|
@abstract ?
|
||||||
@ -134,7 +148,8 @@
|
|||||||
'link' => 'nextmatchs_link.tpl'
|
'link' => 'nextmatchs_link.tpl'
|
||||||
));
|
));
|
||||||
|
|
||||||
$maxmatchs = intval($phpgw_info['user']['preferences']['common']['maxmatchs']);
|
// $maxmatchs = intval($phpgw_info['user']['preferences']['common']['maxmatchs']);
|
||||||
|
$maxmatchs = $this->maxmatchs;
|
||||||
|
|
||||||
if (($start != 0) && ($start > $maxmatchs))
|
if (($start != 0) && ($start > $maxmatchs))
|
||||||
{
|
{
|
||||||
@ -185,7 +200,8 @@
|
|||||||
$tpl->set_file(array(
|
$tpl->set_file(array(
|
||||||
'link' => 'nextmatchs_link.tpl'
|
'link' => 'nextmatchs_link.tpl'
|
||||||
));
|
));
|
||||||
$maxmatchs = intval($phpgw_info['user']['preferences']['common']['maxmatchs']);
|
// $maxmatchs = intval($phpgw_info['user']['preferences']['common']['maxmatchs']);
|
||||||
|
$maxmatchs = $this->maxmatchs;
|
||||||
|
|
||||||
if (($total > $maxmatchs) && ($total > $start + $maxmatchs))
|
if (($total > $maxmatchs) && ($total > $start + $maxmatchs))
|
||||||
{
|
{
|
||||||
@ -443,14 +459,7 @@
|
|||||||
{
|
{
|
||||||
global $phpgw_info, $start;
|
global $phpgw_info, $start;
|
||||||
|
|
||||||
if ($phpgw_info['user']['preferences']['common']['maxmatchs'] && $phpgw_info['user']['preferences']['common']['maxmatchs'] > 0)
|
$limit = $this->maxmatchs;
|
||||||
{
|
|
||||||
$limit = $phpgw_info['user']['preferences']['common']['maxmatchs'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$limit = 15;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($total_records > $limit)
|
if ($total_records > $limit)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user