From 5f514c5263a05553e8b7a66d9103e36c2b482f2c Mon Sep 17 00:00:00 2001 From: Li Jianxuan Date: Thu, 9 May 2013 08:20:44 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9DOI=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E5=92=8C=E9=80=97=E5=8F=B7=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controllers/DataController.php | 4 ++-- application/models/data/Doi.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index 6923d025..7f6ac475 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -3626,7 +3626,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->data = $data; $info = $doi->checkinfo($data['info']); if(!is_array($info)){ - $this->view->error = view::Error('alert-error',$info,-1); + $this->view->error = view::Error($info); return true; }else{ $data['info'] = $info; @@ -3638,7 +3638,7 @@ class Admin_DataController extends Zend_Controller_Action $this->view->msg = view::Msg('alert-success',"修改成功!",'/admin/data/doi/uuid/'.$uuid); return false; }else{ - $this->view->error = view::Error('alert-error',"修改失败",-1); + $this->view->error = view::Error("修改失败"); return false; } } diff --git a/application/models/data/Doi.php b/application/models/data/Doi.php index 92182264..2b47d4c0 100644 --- a/application/models/data/Doi.php +++ b/application/models/data/Doi.php @@ -82,10 +82,10 @@ class Doi extends Zend_Controller_Plugin_Abstract $orgs_en = array(); foreach($data['info'] as $k=>$v) { - $authors[$v['order']] = $v['author']; - $orgs[$v['order']] = $v['organization']; - $authors_en[$v['order']] = $v['author_en']; - $orgs_en[$v['order']] = $v['organization_en']; + $authors[$v['order']] = str_replace(",",",",$v['author']); + $orgs[$v['order']] = str_replace(",",",",$v['organization']); + $authors_en[$v['order']] = str_replace(",",",",$v['author_en']); + $orgs_en[$v['order']] = str_replace(",",",",$v['organization_en']); } $authors = "{".join(",",$authors)."}"; $orgs = "{".join(",",$orgs)."}"; @@ -107,10 +107,10 @@ class Doi extends Zend_Controller_Plugin_Abstract foreach($authors as $k=>$v) { $info[$k] = array( - 'author'=>$authors[$k], - 'organization'=>$orgs[$k], - 'author_en'=>$authors_en[$k], - 'organization_en'=>$orgs_en[$k], + 'author'=>str_replace("\"","",$authors[$k]), + 'organization'=>str_replace("\"","",$orgs[$k]), + 'author_en'=>str_replace("\"","",$authors_en[$k]), + 'organization_en'=>str_replace("\"","",$orgs_en[$k]), 'order'=> count($authors)+($k-1) ); }