fix #410, 黑河数据汇交中添加元数据错误检查
This commit is contained in:
parent
7e87fc1768
commit
cae70ddec1
|
@ -489,6 +489,16 @@ class HeiheController extends DataController
|
|||
$uuid = $row['uuid'];
|
||||
}
|
||||
|
||||
//检查元数据错误
|
||||
$iso=new ISO19115();
|
||||
@$iso->loadXML($row['data']);
|
||||
if ($iso->validate())
|
||||
{
|
||||
$data=array("error"=>"元数据导入过程中发现错误。<br />".implode("<br />",$iso->error));
|
||||
$this->jsonexit($data);
|
||||
return true;
|
||||
}
|
||||
|
||||
$messages = array();
|
||||
|
||||
// 保存数据作者信息
|
||||
|
@ -566,8 +576,7 @@ class HeiheController extends DataController
|
|||
|
||||
// 3. 保存数据评审状态
|
||||
//导入元数据
|
||||
$iso=new ISO19115();
|
||||
$iso->saveDB($this->db,$row['xml']);
|
||||
$iso->saveDB($this->db);
|
||||
//进入评审库
|
||||
$sql="insert into mdstatus (uuid,status,userid) values(?,?,?)";
|
||||
$this->db->query($sql,array($uuid,0,$u_id));
|
||||
|
|
Loading…
Reference in New Issue