From 5ed06ccc785555a57dc0329e36c493021aa85410 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 2 May 2018 12:13:27 +0800 Subject: [PATCH] update error display function --- application/admin/controllers/DataController.php | 12 ++++++------ application/admin/views/scripts/data/newdata.phtml | 12 +++++++++++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/application/admin/controllers/DataController.php b/application/admin/controllers/DataController.php index dce080fd..1c57abb9 100755 --- a/application/admin/controllers/DataController.php +++ b/application/admin/controllers/DataController.php @@ -3492,12 +3492,12 @@ group by m.uuid,m.title,m.description) md ON md.uuid=v.uuid }catch(Exception $e) { $sql="delete from mdstatus where uuid in (select uuid from geonetworkmetadata where id=?)"; $this->db->query($sql,array($id)); - $msg = "提交失败,请确认权限后重试"; - if($this->debug>0) - {$msg .= $e->getMessage();} - $data = array("error"=>$msg); - $this->jsonexit($data); - return true; + $msg = "提交失败,请确认权限后重试"; + if($this->debug>0) + {$msg .= $e->getMessage();} + $data = array("error"=>$msg, "detail"=>$e->getMessage()); + $this->jsonexit($data); + return true; } } diff --git a/application/admin/views/scripts/data/newdata.phtml b/application/admin/views/scripts/data/newdata.phtml index 6e04e1d9..9efa7a34 100644 --- a/application/admin/views/scripts/data/newdata.phtml +++ b/application/admin/views/scripts/data/newdata.phtml @@ -59,6 +59,16 @@