From 7e430e7e9e86d1a057d06c035426c17b80c9d8ae Mon Sep 17 00:00:00 2001 From: wlx Date: Tue, 20 Dec 2011 09:20:20 +0000 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=8F=82=E8=80=83=E6=96=87?= =?UTF-8?q?=E7=8C=AE=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index df9bf8c1..df4d10e9 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -684,8 +684,13 @@ class Admin_DataController extends Zend_Controller_Action $lines=explode("\n",$ref); foreach($lines as $line) { - $data=explode(";",$line); - $sql="insert into reference (reference) values(?)"; + $data=explode(";",$line); + if (count($data)==2) + $link=''; + else + $link=$data[2]; + $link=$this->db->quote($link); + $sql="insert into reference (reference,link) values(?,".$link.")"; try { $this->db->exec($this->db->quoteInto($sql,$data[1])); } catch (Exception $e) {}