From b2b5ed0a5ec904b2ca8735f0ee6ec9e9699dfa0d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 24 Oct 2018 13:50:42 +0800 Subject: [PATCH] * fix error. --- module/doc/control.php | 2 +- module/doc/view/browse.html.php | 2 +- module/doc/view/browsebygrid.html.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index c07f637a93..fc95b0feaa 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -158,7 +158,7 @@ class doc extends control if(!empty($lib) and (!empty($lib->product) or !empty($lib->project)) and $browseType != 'bymodule') { $count = $this->dao->select('count(*) as count')->from(TABLE_DOCLIB)->where('project')->eq($lib->project)->andWhere('product')->eq($lib->product)->fetch('count'); - if($count == 1) + if($count == 1 and $type and isset($lib->$type)) { $objectLibs = $this->doc->getLibsByObject($type, $lib->$type); if(isset($objectLibs['project'])) $attachLibs['project'] = $objectLibs['project']; diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 948518eec6..9404ef5502 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -50,7 +50,7 @@ var browseType = ''; " . $this->lang->doc->create, '', "class='btn btn-primary'");?> diff --git a/module/doc/view/browsebygrid.html.php b/module/doc/view/browsebygrid.html.php index 7d4f4bba74..9c07800d9a 100644 --- a/module/doc/view/browsebygrid.html.php +++ b/module/doc/view/browsebygrid.html.php @@ -15,7 +15,7 @@ " . $this->lang->doc->create, '', "class='btn btn-primary'");?>