dever 5 tahun lalu
induk
melakukan
20fb370144
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 6 6
      src/Database.php

+ 6 - 6
src/Database.php

@@ -107,7 +107,7 @@ class Database
      *
      * @return array
      */
-    public function url($key = false, $id = 0, $table = false, $suffix = '', $project = '')
+    public function url($key = false, $id = 0, $table = false, $suffix = '', $project = '', $param = array())
     {
         $table = $table ? $table : $this->table;
 
@@ -149,7 +149,7 @@ class Database
 
         if (isset($config[$key])) {
             if (strpos($config[$key], '{param}')) {
-                $param = $this->getUrlParam($key, $table, $suffix, $state, $project);
+                $param = $this->getUrlParam($key, $table, $suffix, $state, $project, $param);
                 $config[$key] = str_replace('{param}', $param, $config[$key]);
             }
             return Dever::url($config[$key]);
@@ -162,7 +162,7 @@ class Database
      *
      * @return string
      */
-    private function getUrlParam($key, $table, $suffix, $state, $project = '')
+    private function getUrlParam($key, $table, $suffix, $state, $project = '', $input = array())
     {
         $index = md5($key . '_' . $project . '_' . $table . '_' . $suffix);
         if (isset($this->param[$index])) {
@@ -171,7 +171,7 @@ class Database
         $param = '';
         $array = array('project', 'search', 'add', 'list', 'update', 'edit');
         if (in_array($key, $array) && !strstr($table, 'oper_')) {
-            $where = Dever::preInput('search_');
+            $where = Dever::preInput('search_', $input);
             if ($where) {
                 if (isset($where['where_id'])) {
                     //unset($where['where_id']);
@@ -180,12 +180,12 @@ class Database
                 $param .= '&' . http_build_query($where);
             }
 
-            $oper = Dever::preInput('oper_');
+            $oper = Dever::preInput('oper_', $input);
             if ($oper) {
                 $param .= '&' . http_build_query($oper);
             }
 
-            $top = Dever::preInput('top_');
+            $top = Dever::preInput('top_', $input);
             if ($top) {
                 $param .= '&' . http_build_query($top);
             }