diff --git a/application/default/controllers/ReviewController.php b/application/default/controllers/ReviewController.php index 0da6e424..35872d3b 100644 --- a/application/default/controllers/ReviewController.php +++ b/application/default/controllers/ReviewController.php @@ -82,7 +82,7 @@ class ReviewController extends Zend_Controller_Action $page=@(int)$this->_request->getParam('page'); if (empty($page)) $page=1; $offset=$this->limit*($page-1); - $row=$this->db->fetchAll("select count(s.*) from mdstatus s left join metadata m on s.uuid=m.uuid where s.status in (0)"); + $row=$this->db->fetchAll("select count(s.*) from mdstatus s right join metadata m on s.uuid=m.uuid where s.status in (0)"); $sum=$row[0]['count']; $sql="select m.uuid,m.title,m.id,m.description,s.status,s.ts_created,g.id as gid,t.filename from mdstatus s right join metadata m on s.uuid=m.uuid left join geonetworkmetadata g on g.uuid=m.uuid left join thumbnail t on t.id=m.id where s.status in (0) order by s.ts_created desc,m.title limit ? offset ?"; $this->view->metadata=$this->db->fetchAll($sql,array($this->limit,$offset));