This commit is contained in:
2017-06-27 12:02:11 +08:00
parent c3ceff72fc
commit ee45e010e0
3 changed files with 3 additions and 19 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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),
-- --------------------------------------------------------