DESKTOP-9JTA2JJ\HP %!s(int64=5) %!d(string=hai) anos
pai
achega
00be6afb7e
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      api/application/controllers/Alarm.php

+ 3 - 2
api/application/controllers/Alarm.php

@@ -47,8 +47,9 @@ class Alarm extends Base_Controller {
 			$alarmtype = alarm_translate_ch($alarmtype);
 		}
 
-		$page = !isset($page) ? 1 : $page;
-		$limit = empty($count) ? 20 : $count;
+		$page = empty($page) ? 1 : $page;
+		$count = empty($count) ? 20 : $count;
+		$limit = $count;
 		$offset = ($page - 1)*$count;
 		$section = $this->input->post('section',true);