diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index e6f7a564..4fc1dd65 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1319,6 +1319,7 @@ class Admin_DataController extends Zend_Controller_Action $ac = $this->_request->getParam('ac'); $uuid = $this->_request->getParam('uuid'); + $submd=$this->view->config->sub->metadata; set_time_limit(0); $auth = Zend_Auth::getInstance(); @@ -1333,7 +1334,7 @@ class Admin_DataController extends Zend_Controller_Action { //view the versions of the data $sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname,g.id as gid FROM mdversion v - LEFT JOIN metadata md ON md.uuid=v.uuid + LEFT JOIN $submd md ON md.uuid=v.uuid left join users u on v.userid=u.id left join geonetworkmetadata g on md.uuid=g.uuid WHERE md.title IS NOT NULL AND v.uuid=? @@ -1356,7 +1357,7 @@ class Admin_DataController extends Zend_Controller_Action else if((empty($ac) && empty($uuid))|| $ac=='list') { $sql = "SELECT md.title,md.uuid,v.ts_created,v.changelog,v.userid,v.id,u.username,u.realname FROM mdversion v - LEFT JOIN metadata md ON md.uuid=v.uuid + LEFT JOIN $submd md ON md.uuid=v.uuid left join users u on v.userid=u.id WHERE md.title IS NOT NULL order by v.ts_created desc @@ -1380,7 +1381,7 @@ class Admin_DataController extends Zend_Controller_Action if(!empty($keywords)) $this->view->q = $keywords; $sql = "SELECT md.title,md.uuid,count(v.id) as c FROM mdversion v - LEFT JOIN metadata md ON md.uuid=v.uuid + LEFT JOIN $submd md ON md.uuid=v.uuid WHERE md.title IS NOT NULL"; if(!empty($keywords)) {