fixed pagination

This commit is contained in:
Frank Schubert
2021-12-21 22:40:28 +01:00
parent f00100c4df
commit 9413110d5c
3 changed files with 5 additions and 6 deletions
@@ -41,7 +41,6 @@ class VoicenumberblockController extends mfBaseController {
$pagination['maxItems'] = VoicenumberblockModel::count($filter);
$blocks = VoicenumberblockModel::search($filter, $pagination);
$this->layout()->set("blocks", $blocks);
$this->layout()->set("pagination", $pagination);
@@ -94,8 +94,6 @@ class VoicenumberblockModel {
WHERE $where
ORDER BY countrycode, areacode, first, last";
$res = $db->query($sql);
if(is_array($limit) && count($limit)) {
if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
$sql .= " LIMIT ".$limit['start'].", ".$limit['count'];
@@ -104,7 +102,9 @@ class VoicenumberblockModel {
}
}
mfLoghandler::singleton()->debug($sql);
$res = $db->query($sql);
//mfLoghandler::singleton()->debug($sql);
if($db->num_rows($res)) {
while($data = $db->fetch_object($res)) {