repair the authors problem in bibtex
This commit is contained in:
parent
753963a839
commit
44321d4085
|
@ -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";
|
$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);
|
$row=$this->db->fetchRow($sql);
|
||||||
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
|
$authors=explode(',',str_replace('"','',substr($row['authors'],1,-1)));
|
||||||
$orgs=explode(',',str_replace('"','',substr($row['organization'],1,-1)));
|
|
||||||
$ris.='TY - JOUR'."\r\n";
|
$ris.='TY - JOUR'."\r\n";
|
||||||
$ris.='T1 - '.$row['title']."\r\n";
|
$ris.='T1 - '.$row['title']."\r\n";
|
||||||
foreach($authors as $a)
|
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";
|
$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);
|
$row=$this->db->fetchRow($sql);
|
||||||
$authors=explode(',',str_replace('"','',substr($row['author_en'],1,-1)));
|
$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.='TY - JOUR'."\r\n";
|
||||||
$ris.='T1 - '.$row['title_en']."\r\n";
|
$ris.='T1 - '.$row['title_en']."\r\n";
|
||||||
foreach($authors as $a)
|
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";
|
$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);
|
$row=$this->db->fetchRow($sql);
|
||||||
$bib.='@article{'.$row['doi'].",\r\n";
|
$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.=' journal = {'.$row['publisher']."},\r\n";
|
||||||
$bib.=' publisher = {'.$row['publisher']."},\r\n";
|
$bib.=' publisher = {'.$row['publisher']."},\r\n";
|
||||||
$bib.=' title = {'.$row['title']."},\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";
|
$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);
|
$row=$this->db->fetchRow($sql);
|
||||||
$bib.='@article{'.$row['doi'].",\r\n";
|
$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.=' journal = {'.$row['publisher_en']."},\r\n";
|
||||||
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
|
$bib.=' publisher = {'.$row['publisher_en']."},\r\n";
|
||||||
$bib.=' title = {'.$row['title']."},\r\n";
|
$bib.=' title = {'.$row['title']."},\r\n";
|
||||||
|
|
Loading…
Reference in New Issue