修改文件上传时的逻辑错误
This commit is contained in:
parent
889d4a4bbf
commit
d55e2f9cec
|
@ -44,9 +44,9 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
$this->view->msg='成功同步元数据!';
|
||||
} elseif ($source=="watergn" && empty($uuid) ) {
|
||||
//首先删除所有的黑河试验数据
|
||||
//$sql="delete from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'";
|
||||
//$sql="delete from metadata where source='e3ad32dc-f573-11e0-aa7b-b768cfd88d80'";
|
||||
$sql="delete from metadata where uuid in (select uuid from heihegn)";
|
||||
$this->db->query($sql);
|
||||
$this->db->query($sql);
|
||||
$sql="delete from responsible where id not in (select distinct(resid) from role)";
|
||||
$this->db->query($sql);
|
||||
//同步黑河遥感实验的元数据
|
||||
|
@ -388,7 +388,7 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
$select=$this->db->select();
|
||||
$select->from('metadata')
|
||||
->joinLeft('mdstat','metadata.uuid=mdstat.uuid','viewed')
|
||||
->joinLeft('geonetworkmetadata','geonetworkmetadata.uuid=metadata.uuid','id as gid')
|
||||
->joinLeft('geonetworkmetadata','geonetworkmetadata.uuid=metadata.uuid','id as gid')
|
||||
->joinLeft('mdstatus','metadata.uuid=mdstatus.uuid','status as mdstatus')
|
||||
->order('metadata.id desc');
|
||||
$paginator = Zend_Paginator::factory($select);
|
||||
|
@ -851,14 +851,14 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
else
|
||||
{
|
||||
$this->messenger->addMessage('读取用户信息出错');
|
||||
$this->_redirect("/admin/data/attachments/add/1");
|
||||
@unlink($filename);
|
||||
$this->_redirect("/admin/data/attachments/add/1");
|
||||
}
|
||||
}else
|
||||
{
|
||||
$this->messenger->addMessage('附件上传失败:'.$msg['error']);
|
||||
$this->_redirect("/admin/data/attachments/add/1");
|
||||
@unlink($filename);
|
||||
$this->_redirect("/admin/data/attachments/add/1");
|
||||
}
|
||||
}
|
||||
}//附件添加
|
||||
|
|
Loading…
Reference in New Issue