add more error control when submit new metadata
This commit is contained in:
parent
be8b6ef2b5
commit
a2745777c2
|
@ -442,8 +442,8 @@ class HeiheController extends DataController
|
||||||
$this->_helper->viewRenderer->setNoRender();
|
$this->_helper->viewRenderer->setNoRender();
|
||||||
|
|
||||||
$data = "";
|
$data = "";
|
||||||
|
$id = $this->_request->getParam('id');
|
||||||
try{
|
try{
|
||||||
$id = $this->_request->getParam('id');
|
|
||||||
if(empty($id) || !is_numeric($id))
|
if(empty($id) || !is_numeric($id))
|
||||||
{
|
{
|
||||||
$data = array("error"=>"参数错误");
|
$data = array("error"=>"参数错误");
|
||||||
|
@ -609,6 +609,11 @@ class HeiheController extends DataController
|
||||||
$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