Fix limit

This commit is contained in:
Laurent Destailleur 2019-10-08 13:17:13 +02:00
parent 73422b2149
commit 7377c30bfe

View File

@ -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)