From ded86c30e922a49afa157ff05252e11d24742318 Mon Sep 17 00:00:00 2001 From: wlx Date: Fri, 2 Jul 2010 17:39:53 +0000 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=8C=AE=E5=85=A5=E5=BA=93=E6=97=B6?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=89=8D=E5=90=8E=E7=9A=84=E7=A9=BA=E6=A0=BC?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E5=A4=A7=E9=BB=98=E8=AE=A4=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=8C=83=E5=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 0e6efa9d..f869295d 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -535,16 +535,16 @@ class Admin_DataController extends Zend_Controller_Action $formdata=$this->_request->getPost(); if ($form->isValid($formdata)) { $sql="select id from reference where reference=?"; - $row=$this->db->fetchRow($sql,array($formdata['reference'])); + $row=$this->db->fetchRow($sql,array(trim($formdata['reference']))); if (!$row) { $sql="insert into reference (reference,link) values(?,?)"; - $this->db->query($sql,array($formdata['reference'],$formdata['link'])); + $this->db->query($sql,array(trim($formdata['reference']),trim($formdata['link']))); $sql="select id from reference where reference=?"; - $row=$this->db->fetchRow($sql,array($formdata['reference'])); + $row=$this->db->fetchRow($sql,array(trim($formdata['reference']))); } $sql="insert into mdref (uuid,refid) values(?,?)"; - $this->db->query($sql,array($formdata['uuid'],$row['id'])); + $this->db->query($sql,array(trim($formdata['uuid']),$row['id'])); $this->messenger->addMessage('提示信息:您已经成功添加该数据文献。'); $this->_redirect('/admin/data/reference'); }else { @@ -606,7 +606,7 @@ class Admin_DataController extends Zend_Controller_Action ->order('metadata.title'); $paginator = Zend_Paginator::factory($select); $paginator->setCurrentPageNumber($this->_getParam('page')); - $paginator->setItemCountPerPage($this->view->config->page->max); + $paginator->setItemCountPerPage(30); $paginator->setView($this->view); Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination.phtml'); $this->view->paginator=$paginator;