From c94f452eb6890d6124f7d59484452b134806873a Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Tue, 9 Jul 2013 01:35:21 +0000 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BA=86=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E5=92=8C=E6=88=91=E8=AF=84=E5=AE=A1=E8=BF=87?= =?UTF-8?q?=E7=9A=84=E4=B8=AD=E7=9A=84=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=99=BB=E5=BD=95=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/controllers/ReviewController.php | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index e13a0c05..dc6d2d7c 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -146,14 +146,19 @@ class ReviewController extends Zend_Controller_Action $this->view->pageID = "review-inreview-require"; $uid = view::User('id'); - $sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id,e.id as eid + if(empty($uid)) + { + view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/require")); + } + + $sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created,r.id as rid,e.id as eid from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id left join mdreview r ON m.uuid=r.uuid - left join mdexpertreview e ON (e.id = s.userid AND e.uuid=m.uuid) - WHERE s.status in (2,3,4) AND s.userid=8018 AND r.id IS NULL + left join mdexpertreview e ON e.uuid=m.uuid + WHERE s.status in (2,3,4) AND r.id IS NULL GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created,r.id,e.id order by e.id DESC,s.ts_created desc,m.title"; $rs = $this->db->query($sql); @@ -165,13 +170,19 @@ class ReviewController extends Zend_Controller_Action $this->_helper->viewRenderer('inreview-reviewed'); $this->view->pageID = "review-inreview-reviewed"; $uid = view::User('id'); + + if(empty($uid)) + { + view::Post($this,"请先登录","/account/login/?href=".urlencode("/review/inreview/ac/reviewed")); + } + $sql = "select m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id as gid,t.filename,r.ts_created from mdstatus s right join normalmetadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id left join mdreview r ON m.uuid=r.uuid - WHERE s.status in (2,3,4) AND s.userid=8018 AND r.userid=8018 + WHERE s.status in (2,3,4) AND r.userid=$uid GROUP BY m.uuid,m.title,m.id,m.description,s.status,s.ts_accepted,g.id,t.filename,s.ts_created,r.ts_created order by s.ts_created desc,m.title"; $rs = $this->db->query($sql);