Pman/Roo.php
authorleon <leon@roojs.com>
Tue, 2 Aug 2022 05:00:47 +0000 (13:00 +0800)
committerleon <leon@roojs.com>
Tue, 2 Aug 2022 05:00:47 +0000 (13:00 +0800)
Pman/Roo.php

index dd6aba7..2e1ac28 100644 (file)
@@ -279,7 +279,7 @@ class Pman_Roo extends Pman
         
         $fake_limit = false;
         
-        if (!empty($_REQUEST['_distinct']) && !isset($_REQUEST['_no_count']) && $total < 400) {
+        if (!empty($_REQUEST['_distinct']) && isset($total) && $total < 400) {
             $fake_limit  = true;
         }
         
@@ -311,7 +311,9 @@ class Pman_Roo extends Pman
         
         if (!empty($_REQUEST['query']['add_blank'])) {
             $ret[] = array( 'id' => 0, 'name' => '----');
-            $total+=1;
+            if(isset($total)) {
+                $total+=1;
+            }
         }
          
         $rooar = method_exists($x, 'toRooArray');