From fcf0dd2bf22bb6af7a6084b373293cc98802d20d Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Wed, 9 Nov 2011 09:08:06 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=85=83=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=BD=BF=E7=94=A8ajax=E4=B8=8A=E4=BC=A0=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=97=B6=E5=86=99=E5=85=A5=E7=9B=AE=E5=BD=95=E7=9A=84?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=B8=BA=E4=BB=8Efiles()=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E5=80=BC=E4=B8=AD=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 11e4e0e5..9073e0e6 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -1306,11 +1306,11 @@ class Admin_DataController extends Zend_Controller_Action $filename = $msg['db_path']; $filesize = $msg['file_size']; $filedesc = $this->_request->getParam('filedesc'); - $filetype = $this->_request->getParam('dir'); + $filetype = $msg['file_type']; $realname = $msg['realname']; - $sql = "insert into attachments (filename,filetype,filedesc,userid,filesize,realname) values ('$filename','reviewatt','$filedesc','$userid','$filesize','$realname') RETURNING id"; + $sql = "insert into attachments (filename,filetype,filedesc,userid,filesize,realname) values ('$filename','$filetype','$filedesc','$userid','$filesize','$realname') RETURNING id"; $sth = $this->db->prepare($sql); $sth->execute(); $att = $sth->fetch(PDO::FETCH_ASSOC);