From cfb55a67ddb75b46e7177c8ca05dae87ff09051a Mon Sep 17 00:00:00 2001 From: wlx Date: Sat, 31 Jan 2015 08:27:07 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0DOI=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/default/controllers/DataController.php | 10 +++++----- application/default/views/scripts/data/doi.phtml | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/application/default/controllers/DataController.php b/application/default/controllers/DataController.php index bc060e88..0040163d 100755 --- a/application/default/controllers/DataController.php +++ b/application/default/controllers/DataController.php @@ -1977,23 +1977,23 @@ class DataController extends Zend_Controller_Action $ac = $this->_request->getParam('ac'); if ($ac=='unready') { //列出没有DOI的数据 - $sql="select m.* from normalmetadata m where length(m.doi)<3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc"; + $sql="select m.* from {$this->submd} m where length(m.doi)<3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc"; $this->view->pageID='doi-unready'; } else if ($ac=='prepare') { //列出有DOI但还未进行提交申请的数据 - $sql="select m.* from normalmetadata m where length(m.doi)>3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc"; + $sql="select m.* from {$this->submd} m where length(m.doi)>3 and m.uuid not in (select uuid from datadoi) order by m.ts_created desc"; $this->view->pageID='doi-prepare'; } else if ($ac=='unsubmit') { //列出有DOI并计划提交申请的数据 - $sql="select m.*,d.doi as datadoi,date(d.ts_created) as ts_created from normalmetadata m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_created is not null and d.ts_submitted is null order by d.ts_created desc"; + $sql="select m.*,d.doi as datadoi,date(d.ts_created) as ts_created from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_created is not null and d.ts_submitted is null order by d.ts_created desc"; $this->view->pageID='doi-unsubmit'; } else if ($ac=='submit') { //列出有DOI并计划提交申请的数据 - $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted from normalmetadata m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_submitted is not null and d.ts_published is null order by d.ts_submitted desc,d.ts_created desc"; + $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_submitted is not null and d.ts_published is null order by d.ts_submitted desc,d.ts_created desc"; $this->view->pageID='doi-submit'; } else if ($ac=='publish' || empty($ac)) { //默认:列出最新发布的DOI数据 - $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted,date(d.ts_published) as ts_published from normalmetadata m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_published is not null order by d.ts_published desc,d.ts_submitted desc,d.ts_created desc"; + $sql="select m.*,d.doi as datadoi,date(d.ts_submitted) as ts_submitted,date(d.ts_published) as ts_published from {$this->submd} m left join datadoi d on m.uuid=d.uuid where length(m.doi)>3 and d.ts_published is not null order by d.ts_published desc,d.ts_submitted desc,d.ts_created desc"; $this->view->pageID='doi-publish'; } $sth = $this->db->prepare($sql); diff --git a/application/default/views/scripts/data/doi.phtml b/application/default/views/scripts/data/doi.phtml index 9762ec3f..3d5f9091 100644 --- a/application/default/views/scripts/data/doi.phtml +++ b/application/default/views/scripts/data/doi.phtml @@ -13,7 +13,6 @@ $this->theme->AppendPlus($this,'colorbox'); -