repair the authors problem in bibtex

This commit is contained in:
wlx 2013-05-14 22:20:12 +00:00
parent 753963a839
commit 44321d4085
1 changed files with 2 additions and 4 deletions

View File

@ -1390,7 +1390,6 @@ class ServiceController extends Zend_Controller_Action
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
$orgs=explode(',',str_replace('"','',substr($row['organization'],1,-1)));
$ris.='TY - JOUR'."\r\n";
$ris.='T1 - '.$row['title']."\r\n";
foreach($authors as $a)
@ -1411,7 +1410,6 @@ class ServiceController extends Zend_Controller_Action
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
$orgs=explode(',',str_replace('"','',substr($row['organization'],1,-1)));
$ris.='TY - JOUR'."\r\n";
$ris.='T1 - '.$row['title_en']."\r\n";
foreach($authors as $a)
@ -1448,7 +1446,7 @@ class ServiceController extends Zend_Controller_Action
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$bib.='@article{'.$row['doi'].",\r\n";
$bib.=' author = '.str_replace('"','',$row['authors']).",\r\n";
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['authors'])).",\r\n";
$bib.=' journal = {'.$row['publisher']."},\r\n";
$bib.=' publisher = {'.$row['publisher']."},\r\n";
$bib.=' title = {'.$row['title']."},\r\n";
@ -1463,7 +1461,7 @@ class ServiceController extends Zend_Controller_Action
$sql="select d.*,m.description from datadoi d left join metadata m on d.uuid=m.uuid where d.uuid='$uuid' and d.ts_published is not null";
$row=$this->db->fetchRow($sql);
$bib.='@article{'.$row['doi'].",\r\n";
$bib.=' author = '.str_replace('"','',$row['author_en']).",\r\n";
$bib.=' author = '.str_replace('"','',str_replace(',',' and ',$row['author_en'])).",\r\n";
$bib.=' journal = {'.$row['publisher_en']."},\r\n";
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
$bib.=' title = {'.$row['title']."},\r\n";