rabin преди 3 години
родител
ревизия
32c6cc64e6
променени са 1 файла, в които са добавени 24 реда и са изтрити 3 реда
  1. 24 3
      src/Database.php

+ 24 - 3
src/Database.php

@@ -220,12 +220,10 @@ class Database
         if ($page_type) {
             $param .= '&page_type=' . $page_type . '';
         }
-        /*
         $where_id = Dever::input('where_id');
         if ($where_id) {
             $param .= '&where_id=' . $where_id . '';
         }
-        */
         $menu_id = Dever::input('menu_id');
         if ($menu_id && !strstr($param, 'menu_id')) {
             $param .= '&menu_id=' . $menu_id . '';
@@ -543,7 +541,19 @@ class Database
             }
         }
 
-        return ($table && isset($this->config[$path][$table])) ? $this->config[$path][$table] : $this->config[$path];
+        if (isset($this->config[$path][$table])) {
+            $manage = Dever::config('base')->manage;
+            if ($manage) {
+                if (isset($manage['info'])) {
+                    $this->config[$path][$table]['info'] = $manage['info'];
+                }
+                if (isset($manage['desc'])) {
+                    $this->config[$path][$table]['desc'] = $manage['desc'];
+                }
+            }
+            return $this->config[$path][$table];
+        }
+        return $this->config[$path];
     }
 
     /**
@@ -1155,7 +1165,12 @@ class Database
         if ($refer) {
             $button['返回上一页'] = array('location', Dever::decode($refer));
         }
+        # 不显示哪个按钮
+        $manage = Dever::config('base')->manage;
         foreach ($button as $k => $v) {
+            if ($manage && isset($manage['deleteButton']) && in_array($k, $manage['deleteButton'])) {
+                continue;
+            }
             if (is_array($v)) {
                 if ($v[0] == 'location') {
                     if ($v[1] == 'add') {
@@ -1224,6 +1239,8 @@ class Database
             }
         }
 
+        $result = ltrim($result, '  ');
+
         return $result;
     }
 
@@ -1664,6 +1681,10 @@ class Database
 
         $result = array();
 
+        if (!Dever::load('manage/database.list_tbody')) {
+            return $result;
+        }
+
         if (isset($config['struct'])) {
             if (isset($config['manage']['list']) && $config['manage']['list'] == 'update') {
                 # 验证头部权限 这里如果是多个选择权限的话,暂时无法实现。。。