|
|
@ -136,7 +136,14 @@ class Information extends CI_Controller
|
|
|
|
$node_map = array();
|
|
|
|
$node_map = array();
|
|
|
|
// 循环复制各个层级的节点。
|
|
|
|
// 循环复制各个层级的节点。
|
|
|
|
foreach ($src_path as $n => $item) {
|
|
|
|
foreach ($src_path as $n => $item) {
|
|
|
|
if ($item->is_parent_id == $src->is_id) {
|
|
|
|
|
|
|
|
|
|
|
|
// 定位复制的父节点
|
|
|
|
|
|
|
|
$target_is_id = $dest->is_id;
|
|
|
|
|
|
|
|
foreach ($node_map as $old => $new) {
|
|
|
|
|
|
|
|
if ($item->is_parent_id == $old) {
|
|
|
|
|
|
|
|
$target_is_id = $new;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
// info_content
|
|
|
|
// info_content
|
|
|
|
$item_info_content = $this->InfoContents_model->get_ic_contents2($item->is_ic_id);
|
|
|
|
$item_info_content = $this->InfoContents_model->get_ic_contents2($item->is_ic_id);
|
|
|
|
$this->InfoContents_model->Add_with_sitecode(
|
|
|
|
$this->InfoContents_model->Add_with_sitecode(
|
|
|
@ -190,13 +197,9 @@ class Information extends CI_Controller
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_SCHEMA', $item_meta_pcschema);
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_SCHEMA', $item_meta_pcschema);
|
|
|
|
|
|
|
|
|
|
|
|
// 添加节点
|
|
|
|
// 添加节点
|
|
|
|
$this->InfoStructures_model->Add_with_sitecode($dest->is_id, $this->InfoContents_model->insert_id, 999, $dest->is_sitecode);
|
|
|
|
$this->InfoStructures_model->Add_with_sitecode($target_is_id, $this->InfoContents_model->insert_id, 999, $dest->is_sitecode);
|
|
|
|
$node_map[$item->is_id] = $this->InfoStructures_model->insert_id;
|
|
|
|
$node_map[$item->is_id] = $this->InfoStructures_model->insert_id;
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print_r($node_map);
|
|
|
|
print_r($node_map);
|
|
|
|