文献入库时删除前后的空格,加大默认页面范围
This commit is contained in:
parent
877e263f34
commit
ded86c30e9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue