|
|
@ -113,17 +113,25 @@ class Information extends CI_Controller
|
|
|
|
if ($src_is_id == $dest_is_id || empty($src_is_id) || empty($dest_is_id)) {
|
|
|
|
if ($src_is_id == $dest_is_id || empty($src_is_id) || empty($dest_is_id)) {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//源节点结构
|
|
|
|
// 源节点
|
|
|
|
$src = $this->InfoStructures_model->Detail($src_is_id);
|
|
|
|
$src = $this->InfoStructures_model->Detail($src_is_id);
|
|
|
|
$src_path = $this->Information_model->get_list_by_path($src->is_path, false, $src->is_sitecode);
|
|
|
|
$src_path = $this->Information_model->get_list_by_path($src->is_path, false, $src->is_sitecode);
|
|
|
|
foreach ($src_path as $item) {
|
|
|
|
// 源子节点
|
|
|
|
|
|
|
|
foreach ($src_path as $n => $item) {
|
|
|
|
if ($item->is_id === $src->is_id) {
|
|
|
|
if ($item->is_id === $src->is_id) {
|
|
|
|
unset($item);
|
|
|
|
unset($src_path[$n]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//目标节点结构
|
|
|
|
//目标节点结构
|
|
|
|
$dest = $this->InfoStructures_model->Detail($dest_is_id);
|
|
|
|
$dest = $this->InfoStructures_model->Detail($dest_is_id);
|
|
|
|
$dest_path = $this->Information_model->get_list_by_path($dest->is_path, false, $dest->is_sitecode);
|
|
|
|
$dest_path = $this->Information_model->get_list_by_path($dest->is_path, false, $dest->is_sitecode);
|
|
|
|
|
|
|
|
// 目标子节点
|
|
|
|
|
|
|
|
foreach ($dest_path as $n => $item) {
|
|
|
|
|
|
|
|
if ($item->is_id === $dest->is_id) {
|
|
|
|
|
|
|
|
unset($dest_path[$n]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
print_r($src);
|
|
|
|
print_r($src);
|
|
|
|
print_r($src_path);
|
|
|
|
print_r($src_path);
|
|
|
|
print_r($dest);
|
|
|
|
print_r($dest);
|
|
|
|