mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix limit
This commit is contained in:
parent
73422b2149
commit
7377c30bfe
|
|
@ -868,7 +868,15 @@ class Categorie extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
if ($limit) $sql.= $this->db->plimit($limit + 1, $offset);
|
||||
if ($limit) {
|
||||
if ($page < 0)
|
||||
{
|
||||
$page = 0;
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
|
||||
$sql.= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user