GET as $key => $val){ $GLOBALS[$key] = $val; } foreach($tab->POST as $key => $val){ $GLOBALS[$key] = $val; } //On met à jour le graphe rdf avant de supprimer if($pmb_synchro_rdf){ $arrayIdImpactes=array(); $synchro_rdf=new synchro_rdf(); $noeud=new noeuds($id); $thes=new thesaurus($noeud->num_thesaurus); //parent if($noeud->num_parent!=$thes->num_noeud_racine){ $arrayIdImpactes[]=$noeud->num_parent; } //renvoi_voir if($noeud->num_renvoi_voir){ $arrayIdImpactes[]=$noeud->num_renvoi_voir; } //on supprime le rdf if(count($arrayIdImpactes)){ foreach($arrayIdImpactes as $idNoeud){ $synchro_rdf->delConcept($idNoeud); } } $synchro_rdf->delConcept($id); } // nettoyage indexation concepts $index_concept = new index_concept($id, TYPE_CATEGORY); $index_concept->delete(); $requete="DELETE FROM notices_categories WHERE num_noeud=".$id; pmb_mysql_query($requete, $dbh); noeuds::delete($id); //On remet à jour les noeuds impactes if($pmb_synchro_rdf){ if(count($arrayIdImpactes)){ foreach($arrayIdImpactes as $idNoeud){ $synchro_rdf->storeConcept($idNoeud); } } } } else { $tab = new stdClass(); $requete="SELECT notcateg_notice FROM notices_categories WHERE num_noeud=".$id." ORDER BY ordre_categorie"; $result_cat=pmb_mysql_query($requete, $dbh); if (pmb_mysql_num_rows($result_cat)) { //affichage de l'erreur, en passant tous les param postés (serialise) pour l'éventuel forcage $tab->POST = $_POST; $tab->GET = $_GET; $ret_url= urlencode(serialize($tab)); require_once("$class_path/mono_display.class.php"); require_once("$class_path/serial_display.class.php"); print "
$msg[540]
".$msg["autorite_suppr_categ_titre"]."
"; while (($r_cat=pmb_mysql_fetch_object($result_cat))) { $requete="select signature, niveau_biblio ,notice_id from notices where notice_id=".$r_cat->notcateg_notice." limit 20"; $result=pmb_mysql_query($requete, $dbh); if (($r=pmb_mysql_fetch_object($result))) { if($r->niveau_biblio != 's' && $r->niveau_biblio != 'a') { // notice de monographie $nt = new mono_display($r->notice_id); } else { // on a affaire à un périodique $nt = new serial_display($r->notice_id,1); } echo "
$nt->result
"; } echo ""; } exit(); } } // error_message($msg[321], $msg[categ_delete_used], 1, "./autorites.php?categ=categories&id=$id&sub=categ_form&parent=$parent"); // exit(); } elseif (count(noeuds::listTargetsOrphansOnly($id)) && !isset($force_delete_target)) { box_confirm_message($msg[321], $msg[confirm_suppr_categ_rejete], "./autorites.php?categ=categories&sub=delete&parent=$parent&id=$id&force_delete_target=1", "./autorites.php?categ=categories&id=$id&sub=categ_form&parent=$parent", $msg[40], $msg[39]); exit(); } else { $array_to_delete = array(); $id_list_orphans = noeuds::listTargetsOrphansOnly($id); if (count($id_list_orphans)) { foreach ($id_list_orphans as $id_orphan) { // on n'efface pas les termes orphelins avec terme spécifique // on n'efface pas les termes orphelins utilisées en indexation if (!noeuds::hasChild($id_orphan) && !noeuds::isUsedInNotices($id_orphan)) { $array_to_delete[] = $id_orphan; } } } $array_to_delete[] = $id; foreach($array_to_delete as $id_to_delete){ //On met à jour le graphe rdf avant de supprimer if($pmb_synchro_rdf){ $arrayIdImpactes=array(); $synchro_rdf=new synchro_rdf(); $noeud=new noeuds($id_to_delete); $thes=new thesaurus($noeud->num_thesaurus); //parent if($noeud->num_parent!=$thes->num_noeud_racine){ $arrayIdImpactes[]=$noeud->num_parent; } //renvoi_voir if($noeud->num_renvoi_voir){ $arrayIdImpactes[]=$noeud->num_renvoi_voir; } //on supprime le rdf if(count($arrayIdImpactes)){ foreach($arrayIdImpactes as $idNoeud){ $synchro_rdf->delConcept($idNoeud); } } $synchro_rdf->delConcept($id_to_delete); } // nettoyage indexation concepts $index_concept = new index_concept($id_to_delete, TYPE_CATEGORY); $index_concept->delete(); noeuds::delete($id_to_delete); //On remet à jour les noeuds impactes if($pmb_synchro_rdf){ if(count($arrayIdImpactes)){ foreach($arrayIdImpactes as $idNoeud){ $synchro_rdf->storeConcept($idNoeud); } } //On met à jour le thésaurus pour les topConcepts $synchro_rdf->updateAuthority($noeud->num_thesaurus,'thesaurus'); } } } include('./autorites/subjects/default.inc.php'); ?>