add more error control when submit new metadata
This commit is contained in:
parent
be8b6ef2b5
commit
a2745777c2
|
@ -441,9 +441,9 @@ class HeiheController extends DataController
|
||||||
$this->_helper->layout->disableLayout();
|
$this->_helper->layout->disableLayout();
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
$data = "";
|
$data = "";
|
||||||
try{
|
$id = $this->_request->getParam('id');
|
||||||
$id = $this->_request->getParam('id');
|
try{
|
||||||
if(empty($id) || !is_numeric($id))
|
if(empty($id) || !is_numeric($id))
|
||||||
{
|
{
|
||||||
$data = array("error"=>"参数错误");
|
$data = array("error"=>"参数错误");
|
||||||
|
@ -608,7 +608,12 @@ class HeiheController extends DataController
|
||||||
$data = array("commited"=>1,"error"=>'该版本已经成功提交,请等待数据中心进一步处理!');
|
$data = array("commited"=>1,"error"=>'该版本已经成功提交,请等待数据中心进一步处理!');
|
||||||
$this->jsonexit($data);
|
$this->jsonexit($data);
|
||||||
return true;
|
return true;
|
||||||
}catch(Exception $e) {
|
}catch(Exception $e) {
|
||||||
|
$sql="delete from mdstatus where uuid in (select uuid from geonetworkmetadata where id=?)";
|
||||||
|
$this->db->query($sql,array($id));
|
||||||
|
$sql="delete from mdauthor where userid=? and uuid in (select uuid from geonetworkmetadata where id=?)";
|
||||||
|
$this->db->query($sql,array($u_id,$id));
|
||||||
|
|
||||||
$msg = "提交失败,请确认权限后重试";
|
$msg = "提交失败,请确认权限后重试";
|
||||||
if($this->debug>0)
|
if($this->debug>0)
|
||||||
{$msg .= $e->getMessage();}
|
{$msg .= $e->getMessage();}
|
||||||
|
|
Loading…
Reference in New Issue