diff --git a/application/default/controllers/ServiceController.php b/application/default/controllers/ServiceController.php
index c0118728..f2f4a029 100644
--- a/application/default/controllers/ServiceController.php
+++ b/application/default/controllers/ServiceController.php
@@ -269,10 +269,10 @@ class ServiceController extends Zend_Controller_Action
$review=$this->_request->getParam('review');
if (!empty($uuid))
{
- $sql="select g.data,m.title,m.description,g.id,m.projection,m.citation,m.title_en
- ,m.ts_published,d.doi as datadoi,d.authors,d.author_en,d.publisher,d.publisher_en, date_part('year',d.ts_published) as publish_year
- from metadata m left join thumbnail t on m.id=t.id
- left join datadoi d on d.uuid=m.uuid
+ $sql="select g.data,m.title,m.description,g.id,m.projection,m.citation,m.title_en
+ ,m.ts_published,d.doi as datadoi,d.authors,d.author_en,d.publisher,d.publisher_en, date_part('year',d.ts_published) as publish_year
+ from metadata m left join thumbnail t on m.id=t.id
+ left join datadoi d on d.uuid=m.uuid
left join geonetworkmetadata g on g.uuid=m.uuid where m.uuid=".$this->db->quote($uuid);
$row=$this->db->fetchRow($sql);
$sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=0 and m.uuid=? order by m.place";
@@ -290,48 +290,48 @@ class ServiceController extends Zend_Controller_Action
$rs=$this->db->fetchRow($sql,array($row['projection']));
if ($rs) $projection=$rs['proj4text'];
}
- if (empty($projection)) $projection=$row['projection'];
- //判断是否使用多篇文献引用
- $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=3 and m.uuid=? order by m.place";
- $sql=$this->db->quoteInto($sql,$uuid);
- $ref=$this->db->fetchAll($sql);
- $ref1="";
- foreach($ref as $k=>$refer)
- {
- $ref1.='
'.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."";
- }
- $row['mcitation']=$ref1;
-
- $citation='';
- if ($row['mcitation'])
- {
- $citation=$row['mcitation'];
- } else if ($row['citation'])
- {
- if (empty($row['datadoi']))
- {
- $citation=$row['citation'];
- }
- elseif (!strpos($row['citation'],$row['datadoi']))
- {
- $citation='文章引用:'.$row['citation'].'';
- $citation.="数据的引用:";
- $citation.=substr($row['authors'],1,-1).'. '.$row['title'].'. '.$row['publisher'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'];
- $citation.=' ['.str_replace('"','',substr($row['author_en'],1,-1)).'. '.$row['title_en'].'. '.$row['publisher_en'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'].']';
- $citation.="";
- }
- }
-
- //支持项目判断
- $sql="select f.* from fund f left join mdfund m on m.fid=f.id where m.uuid=? order by m.place";
- $sql=$this->db->quoteInto($sql,$uuid);
- $ref=$this->db->fetchAll($sql);
- $fund="";
- foreach($ref as $k=>$refer)
- {
- $fund.=''.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")";
- }
- if (empty($fund)) $fund=$row['suppinfo'];
+ if (empty($projection)) $projection=$row['projection'];
+ //判断是否使用多篇文献引用
+ $sql="select r.* from reference r left join mdref m on m.refid=r.id where m.reftype=3 and m.uuid=? order by m.place";
+ $sql=$this->db->quoteInto($sql,$uuid);
+ $ref=$this->db->fetchAll($sql);
+ $ref1="";
+ foreach($ref as $k=>$refer)
+ {
+ $ref1.=''.str_replace(array("\r\n", "\n", "\r"),'',$refer['reference'])."";
+ }
+ $row['mcitation']=$ref1;
+
+ $citation='';
+ if ($row['mcitation'])
+ {
+ $citation=$row['mcitation'];
+ } else if ($row['citation'])
+ {
+ if (empty($row['datadoi']))
+ {
+ $citation=$row['citation'];
+ }
+ elseif (!strpos($row['citation'],$row['datadoi']))
+ {
+ $citation='文章引用:'.$row['citation'].'';
+ $citation.="数据的引用:";
+ $citation.=substr($row['authors'],1,-1).'. '.$row['title'].'. '.$row['publisher'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'];
+ $citation.=' ['.str_replace('"','',substr($row['author_en'],1,-1)).'. '.$row['title_en'].'. '.$row['publisher_en'].', '.(empty($row['ts_published'])?$row['publish_year']:date('Y',strtotime($row['ts_published']))).'. doi:'.$row['datadoi'].']';
+ $citation.="";
+ }
+ }
+
+ //支持项目判断
+ $sql="select f.* from fund f left join mdfund m on m.fid=f.id where m.uuid=? order by m.place";
+ $sql=$this->db->quoteInto($sql,$uuid);
+ $ref=$this->db->fetchAll($sql);
+ $fund="";
+ foreach($ref as $k=>$refer)
+ {
+ $fund.=''.$refer['fund_type'].':'.str_replace(array("\r\n", "\n", "\r"),'',$refer['title']).'(编号:'.$refer['fund_id'].")";
+ }
+ if (empty($fund)) $fund=$row['suppinfo'];
}
@@ -351,8 +351,8 @@ class ServiceController extends Zend_Controller_Action
$xslt->setParameter('', 'thumburl', $thumburl);
$xslt->setParameter('', 'abstract', $abs);
$xslt->setParameter('','projection',$projection);
- $xslt->setParameter('','reference',$reference);
- $xslt->setParameter('','citation',$citation);
+ $xslt->setParameter('','reference',$reference);
+ $xslt->setParameter('','citation',$citation);
$xslt->setParameter('','fund',$fund);
$XSL = new DOMDocument();
$XSL->load( '../data/doc.xsl', LIBXML_NOCDATA);
@@ -394,7 +394,7 @@ class ServiceController extends Zend_Controller_Action
$content.=$xslt->transformToXML($dom);
if ($review==1) $content.=file_get_contents('../data/review-table.htm',true);
- $content.="