From ee45e010e0fee8fea0e75a71a90453bbc6423133 Mon Sep 17 00:00:00 2001 From: molong Date: Tue, 27 Jun 2017 12:02:11 +0800 Subject: [PATCH] update --- application/index/controller/Content.php | 2 +- application/user/controller/Content.php | 9 +-------- data/sql.sql | 11 +---------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/application/index/controller/Content.php b/application/index/controller/Content.php index cdbd4f76..ee318411 100644 --- a/application/index/controller/Content.php +++ b/application/index/controller/Content.php @@ -164,7 +164,7 @@ class Content extends Fornt { return $this->error("无此模型!"); } else { $this->modelInfo = $model_name ? $name_list[$model_name] : $id_list[$model_id]; - $this->model = new M($this->modelInfo['name']); + $this->model = M($this->modelInfo['name']); $this->assign('model_id', $this->modelInfo['id']); $this->assign('model_list', $name_list); diff --git a/application/user/controller/Content.php b/application/user/controller/Content.php index 9872f06b..bd1a4c70 100644 --- a/application/user/controller/Content.php +++ b/application/user/controller/Content.php @@ -25,11 +25,7 @@ class Content extends User { return $this->error("无此模型!"); } else { $this->modelInfo = $list[$model_id]; - if ($this->modelInfo['extend'] > 1) { - $this->model = model($this->modelInfo['name']); - } else { - $this->model = model('Document')->extend($this->modelInfo['name']); - } + $this->model = M($this->modelInfo['name']); } $this->assign('model_id', $model_id); @@ -44,9 +40,6 @@ class Content extends User { $grid_list = get_grid_list($this->modelInfo['list_grid']); $order = "id desc"; $map['uid'] = session('user_auth.uid'); - if ($this->modelInfo['extend'] == 1) { - $map['model_id'] = $this->modelInfo['id']; - } $field = array_filter($grid_list['fields']); $list = $this->model->where($map)->field($field)->order($order)->paginate(15); diff --git a/data/sql.sql b/data/sql.sql index 3a08d6f9..5ecb1de2 100644 --- a/data/sql.sql +++ b/data/sql.sql @@ -1071,16 +1071,7 @@ CREATE TABLE `sent_hooks` ( INSERT INTO `sent_hooks` (`id`, `name`, `description`, `type`, `update_time`, `addons`, `status`) VALUES (1, 'pageHeader', '页面header钩子,一般用于加载插件CSS文件和代码', 1, 0, '', 1), (2, 'pageFooter', '页面footer钩子,一般用于加载插件JS文件和JS代码', 1, 0, '', 1), -(3, 'documentEditForm', '添加编辑表单的 扩展内容钩子', 1, 0, '', 1), -(4, 'documentDetailAfter', '文档末尾显示', 1, 0, '', 1), -(5, 'documentDetailBefore', '页面内容前显示用钩子', 1, 0, '', 1), -(6, 'documentSaveComplete', '保存文档数据后的扩展钩子', 2, 0, '', 1), -(7, 'documentEditFormContent', '添加编辑表单的内容显示钩子', 1, 0, '', 1), -(8, 'adminArticleEdit', '后台内容编辑页编辑器', 1, 1378982734, '', 1), -(13, 'AdminIndex', '首页小格子个性化显示', 1, 1382596073, 'Sitestat,Devteam,Systeminfo', 1), -(14, 'topicComment', '评论提交方式扩展钩子。', 1, 1380163518, '', 1), -(16, 'app_begin', '应用开始', 2, 1384481614, '', 1), -(17, 'J_China_City', '每个系统都需要的一个中国省市区三级联动插件。', 1, 1455877345, '', 1); +(3, 'AdminIndex', '首页小格子个性化显示', 1, 1382596073, 'Sitestat,Devteam,Systeminfo', 1), -- --------------------------------------------------------