From ec3c7068c87d4726bdac818488a186f021c594ac Mon Sep 17 00:00:00 2001 From: wlx Date: Wed, 11 Jun 2014 06:02:36 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=8E=E5=8F=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BD=9C=E8=80=85=E7=9A=84=E5=88=86=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 11 ++++++----- application/admin/views/scripts/data/md.phtml | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 78eb3db1..e6f7a564 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1902,6 +1902,7 @@ class Admin_DataController extends Zend_Controller_Action $ac = $this->_getParam('ac'); $uuid = $this->_getParam('uuid'); + $submd=$this->view->config->sub->metadata; if(empty($ac) && empty($uuid)) { @@ -1910,7 +1911,7 @@ class Admin_DataController extends Zend_Controller_Action if(!empty($keywords)) $this->view->q = $keywords; - $sql = "select md.id,md.title,md.uuid,count(a.userid) as c from metadata md + $sql = "select md.id,md.title,md.uuid,count(a.userid) as c from $submd md right JOIN mdauthor a ON md.uuid=a.uuid "; @@ -2043,7 +2044,7 @@ class Admin_DataController extends Zend_Controller_Action } $sql = "SELECT a.*,md.title,u.realname,u.username FROM mdauthor a - LEFT JOIN metadata md ON a.uuid=md.uuid + LEFT JOIN $submd md ON a.uuid=md.uuid LEFT JOIN users u ON a.userid=u.id WHERE md.uuid=? ORDER BY a.id DESC @@ -2113,7 +2114,7 @@ class Admin_DataController extends Zend_Controller_Action $sql = "SELECT u.id,u.realname,u.email,count(a.id) as d FROM mdauthor a LEFT JOIN users u ON a.userid=u.id - WHERE a.status>0 + WHERE a.status>0 and uuid in (select uuid from $submd) GROUP BY u.id,u.realname,u.email ORDER BY u.id DESC"; @@ -2137,7 +2138,7 @@ class Admin_DataController extends Zend_Controller_Action $id = $this->_getParam('id'); $sql = "SELECT md.title,md.uuid FROM mdauthor a - LEFT JOIN metadata md ON a.uuid=md.uuid + LEFT JOIN $submd md ON a.uuid=md.uuid WHERE a.userid=? AND a.status>0 ORDER BY a.ts_created"; $sth = $this->db->prepare($sql); @@ -2158,7 +2159,7 @@ class Admin_DataController extends Zend_Controller_Action if(!empty($keywords)) $this->view->q = $keywords; - $sql = "select md.id,md.title,md.uuid,count(a.userid) as c from metadata md + $sql = "select md.id,md.title,md.uuid,count(a.userid) as c from $submd md left JOIN mdauthor a ON md.uuid=a.uuid "; diff --git a/application/admin/views/scripts/data/md.phtml b/application/admin/views/scripts/data/md.phtml index 5a25f514..0997e51f 100644 --- a/application/admin/views/scripts/data/md.phtml +++ b/application/admin/views/scripts/data/md.phtml @@ -48,8 +48,6 @@ 操作: 编辑 | 删除 | - 同步 | - 文献管理 | 附件管理 | 反馈管理 | 作者管理 | @@ -66,7 +64,6 @@ 邮件通知 | 支持项目 | - DOI | 数据可视化