修改DOI中的空格和逗号错误
This commit is contained in:
parent
126a7b8f6a
commit
5f514c5263
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue