|
|
|
@ -136,57 +136,69 @@ class Information extends CI_Controller
|
|
|
|
|
$node_map = array();
|
|
|
|
|
// 循环复制各个层级的节点。
|
|
|
|
|
foreach ($src_path as $n => $item) {
|
|
|
|
|
if ($item->is_parent_id == $src->is_id) {
|
|
|
|
|
// info_content
|
|
|
|
|
echo $item->is_ic_id . ' @ ';
|
|
|
|
|
$item_info_content = $this->InfoContents_model->get_ic_contents2($item->is_ic_id);
|
|
|
|
|
|
|
|
|
|
$this->InfoContents_model->Add_with_sitecode(
|
|
|
|
|
$item_info_content->ic_url,
|
|
|
|
|
$item_info_content->ic_url_title,
|
|
|
|
|
$item_info_content->ic_type,
|
|
|
|
|
$item_info_content->ic_title,
|
|
|
|
|
$item_info_content->ic_content,
|
|
|
|
|
$item_info_content->ic_summary,
|
|
|
|
|
$item_info_content->ic_seo_title,
|
|
|
|
|
$item_info_content->ic_seo_description,
|
|
|
|
|
$item_info_content->ic_seo_keywords,
|
|
|
|
|
$item_info_content->ic_show_bread_crumbs,
|
|
|
|
|
$item_info_content->ic_status,
|
|
|
|
|
$item_info_content->ic_template,
|
|
|
|
|
$item_info_content->ic_photo,
|
|
|
|
|
$item_info_content->ic_photo_width,
|
|
|
|
|
$item_info_content->ic_photo_height,
|
|
|
|
|
$item_info_content->ic_recommend_tours,
|
|
|
|
|
$item_info_content->ic_recommend_packages,
|
|
|
|
|
$item_info_content->ic_ht_area_id,
|
|
|
|
|
$item_info_content->ic_ht_area_type,
|
|
|
|
|
$item_info_content->ic_ht_product_id,
|
|
|
|
|
$item_info_content->ic_ht_product_type,
|
|
|
|
|
$item_info_content->ic_author,
|
|
|
|
|
$dest->is_sitecode
|
|
|
|
|
);
|
|
|
|
|
// info_meta
|
|
|
|
|
$item_meta_amp = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP');
|
|
|
|
|
$item_meta_ampstatus = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP_STATUS');
|
|
|
|
|
$item_meta_pcstatus = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP_BODY_PC_STATUS');
|
|
|
|
|
$item_meta_pcbody = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP_BODY_PC');
|
|
|
|
|
$item_meta_pccss = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP_CSS_PC');
|
|
|
|
|
$item_meta_pcschema = $this->InfoMetas_model->Detail($item->is_ic_id, 'AMP_SCHEMA');
|
|
|
|
|
|
|
|
|
|
// 定位复制的父节点
|
|
|
|
|
$target_is_id = $dest->is_id;
|
|
|
|
|
foreach ($node_map as $old => $new) {
|
|
|
|
|
if ($item->is_parent_id == $old) {
|
|
|
|
|
$target_is_id = $new;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// info_content
|
|
|
|
|
$item_info_content = $this->InfoContents_model->get_ic_contents2($item->is_ic_id);
|
|
|
|
|
$this->InfoContents_model->Add_with_sitecode(
|
|
|
|
|
$item_info_content->ic_url,
|
|
|
|
|
$item_info_content->ic_url_title,
|
|
|
|
|
$item_info_content->ic_type,
|
|
|
|
|
$item_info_content->ic_title,
|
|
|
|
|
$item_info_content->ic_content,
|
|
|
|
|
$item_info_content->ic_summary,
|
|
|
|
|
$item_info_content->ic_seo_title,
|
|
|
|
|
$item_info_content->ic_seo_description,
|
|
|
|
|
$item_info_content->ic_seo_keywords,
|
|
|
|
|
$item_info_content->ic_show_bread_crumbs,
|
|
|
|
|
$item_info_content->ic_status,
|
|
|
|
|
$item_info_content->ic_template,
|
|
|
|
|
$item_info_content->ic_photo,
|
|
|
|
|
$item_info_content->ic_photo_width,
|
|
|
|
|
$item_info_content->ic_photo_height,
|
|
|
|
|
$item_info_content->ic_recommend_tours,
|
|
|
|
|
$item_info_content->ic_recommend_packages,
|
|
|
|
|
$item_info_content->ic_ht_area_id,
|
|
|
|
|
$item_info_content->ic_ht_area_type,
|
|
|
|
|
$item_info_content->ic_ht_product_id,
|
|
|
|
|
$item_info_content->ic_ht_product_type,
|
|
|
|
|
$item_info_content->ic_author,
|
|
|
|
|
$dest->is_sitecode
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// info_meta
|
|
|
|
|
$item_meta_amp = $this->InfoMetas_model->get($item->is_ic_id, 'AMP');
|
|
|
|
|
$item_meta_ampjson = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_JSON');
|
|
|
|
|
$item_meta_ampstatus = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_STATUS');
|
|
|
|
|
$item_meta_pcstatus = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_BODY_PC_STATUS');
|
|
|
|
|
$item_meta_pcbody = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_BODY_PC');
|
|
|
|
|
$item_meta_pccss = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_CSS_PC');
|
|
|
|
|
$item_meta_pcschema = $this->InfoMetas_model->get($item->is_ic_id, 'AMP_SCHEMA');
|
|
|
|
|
|
|
|
|
|
if (!empty($item_meta_amp))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP', $item_meta_amp);
|
|
|
|
|
if (!empty($item_meta_ampjson))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_JSON', $item_meta_ampjson);
|
|
|
|
|
if (!empty($item_meta_ampstatus))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_STATUS', $item_meta_ampstatus);
|
|
|
|
|
if (!empty($item_meta_pcstatus))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_BODY_PC_STATUS', $item_meta_pcstatus);
|
|
|
|
|
if (!empty($item_meta_pcbody))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_BODY_PC', $item_meta_pcbody);
|
|
|
|
|
if (!empty($item_meta_pccss))
|
|
|
|
|
$this->InfoMetas_model->Add($this->InfoContents_model->insert_id, 'AMP_CSS_PC', $item_meta_pccss);
|
|
|
|
|
if (!empty($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);
|
|
|
|
|
$node_map[$item->is_id] = $this->InfoStructures_model->insert_id;
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
// 添加节点
|
|
|
|
|
$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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -219,10 +231,10 @@ class Information extends CI_Controller
|
|
|
|
|
$info_detail = $this->Information_model->Detail($is_id);
|
|
|
|
|
|
|
|
|
|
//删除前,备份amp的meta标签-isid。
|
|
|
|
|
$meta_value = $this->InfoMetas_model->get($info_detail->ic_id, 'AMP_JSON');
|
|
|
|
|
if ($meta_value) {
|
|
|
|
|
$this->Logs_model->backup_meta($info_detail->ic_id, $meta_value, 'AMP_JSON_' . $is_id);
|
|
|
|
|
}
|
|
|
|
|
//$meta_value = $this->InfoMetas_model->get($info_detail->ic_id, 'AMP_JSON');
|
|
|
|
|
//if ($meta_value) {
|
|
|
|
|
// $this->Logs_model->backup_meta($info_detail->ic_id, $meta_value, 'AMP_JSON_' . $is_id);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
$this->Logs_model->delete($is_id, $info_detail->ic_content);
|
|
|
|
|
if (!empty($info_detail->ic_summary)) {
|
|
|
|
|