fix #245, 同步数据来源
This commit is contained in:
parent
77b945842d
commit
84b1d45e6d
|
@ -1006,7 +1006,6 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
|
||||
|
||||
$wheresql = array();
|
||||
|
||||
if(!empty($q) && !empty($search))
|
||||
|
@ -1118,6 +1117,18 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
|
||||
|
||||
}// 清除元数据来源记录
|
||||
elseif ($do=='sync') { //同步数据来源到metadata表
|
||||
$redirect = "/admin/data/source/";
|
||||
$sql = "update metadata m set source=s.uuid from source s right join datasource d on s.id=d.sourceid where m.uuid=d.uuid";
|
||||
if($this->db->exec($sql))
|
||||
{
|
||||
$this->messenger->addMessage('成功同步数据来源');
|
||||
$this->_redirect($redirect);
|
||||
}else{
|
||||
$this->messenger->addMessage('同步数据来源失败');
|
||||
$this->_redirect($redirect);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
|
||||
<div class="ctrlplan">
|
||||
<a href="/admin/data/source">项目来源管理</a>
|
||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||
<a href="/admin/data/source/do/add">添加项目来源</a>
|
||||
<a href="/admin/data/source/do/sync">同步项目来源(以此处为准)</a>
|
||||
</div>
|
||||
|
||||
<div class="search">
|
||||
|
|
Loading…
Reference in New Issue