导入参考文献添加数据链接支持
This commit is contained in:
parent
744be6724b
commit
7e430e7e9e
|
@ -684,8 +684,13 @@ class Admin_DataController extends Zend_Controller_Action
|
||||||
$lines=explode("\n",$ref);
|
$lines=explode("\n",$ref);
|
||||||
foreach($lines as $line)
|
foreach($lines as $line)
|
||||||
{
|
{
|
||||||
$data=explode(";",$line);
|
$data=explode(";",$line);
|
||||||
$sql="insert into reference (reference) values(?)";
|
if (count($data)==2)
|
||||||
|
$link='';
|
||||||
|
else
|
||||||
|
$link=$data[2];
|
||||||
|
$link=$this->db->quote($link);
|
||||||
|
$sql="insert into reference (reference,link) values(?,".$link.")";
|
||||||
try {
|
try {
|
||||||
$this->db->exec($this->db->quoteInto($sql,$data[1]));
|
$this->db->exec($this->db->quoteInto($sql,$data[1]));
|
||||||
} catch (Exception $e) {}
|
} catch (Exception $e) {}
|
||||||
|
|
Loading…
Reference in New Issue