Fix: Si on appelle plimit sans paramtre, on prend la valeur par dfaut $conf->liste_limit

This commit is contained in:
Laurent Destailleur 2005-04-09 14:56:46 +00:00
parent 04c060869d
commit af4eaa6e5b
2 changed files with 9 additions and 17 deletions

View File

@ -409,14 +409,10 @@ class DoliDb
function plimit($limit=0,$offset=0) function plimit($limit=0,$offset=0)
{ {
if ($offset > 0) global $conf;
{ if (! $limit) $limit=$conf->liste_limit;
return " LIMIT $offset,$limit "; if ($offset > 0) return " LIMIT $offset,$limit ";
} else return " LIMIT $limit ";
else
{
return " LIMIT $limit ";
}
} }

View File

@ -409,14 +409,10 @@ class DoliDb
function plimit($limit=0,$offset=0) function plimit($limit=0,$offset=0)
{ {
if ($offset > 0) global $conf;
{ if (! $limit) $limit=$conf->liste_limit;
return " LIMIT $offset,$limit "; if ($offset > 0) return " LIMIT $offset,$limit ";
} else return " LIMIT $limit ";
else
{
return " LIMIT $limit ";
}
} }
@ -530,5 +526,5 @@ class DoliDb
} }
} }
?> ?>