rabin há 2 anos atrás
pai
commit
f767b782cf
1 ficheiros alterados com 4 adições e 6 exclusões
  1. 4 6
      src/Database.php

+ 4 - 6
src/Database.php

@@ -2261,11 +2261,10 @@ class Database
             list($param, $high) = $this->list_tbody_search($config, $param, $high, $search);
         }
 
-        if (empty($param['page'])) {
-            $num = $this->getNumConfig($config);
-            if ($num) {
-                $param['page'][0] = $num[0];
-            }
+        $num = $this->getNumConfig($config);
+
+        if (empty($param['page']) && $num) {
+            $param['page'][0] = $num[0];
         }
 
         # 批量更新
@@ -2336,7 +2335,6 @@ class Database
             $i = 0;
             $pg = Dever::input('pg', 1);
             $cur = Dever::input('search_limit', 0);
-            $num = $this->getNumConfig($config);
             
             foreach ($data as $k => $v) {
                 $data[$k] = $this->getAdminInfo($data[$k]);