修改DOI中的空格和逗号错误

This commit is contained in:
Li Jianxuan 2013-05-09 08:20:44 +00:00
parent 126a7b8f6a
commit 5f514c5263
2 changed files with 10 additions and 10 deletions

View File

@ -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;
}
}

View File

@ -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)
);
}