Commit 43635a6a authored by Jerome Mariette's avatar Jerome Mariette
Browse files

No commit message

No commit message
parent 1d2755b2
......@@ -310,17 +310,10 @@ class tx_nG6_eid {
if ($mparts[0] != "taxlevel" and $mparts[0] != "0") {
// If this guy doesnt exist yet
$id_searched = str_replace(".", "_", "node_".$mparts[1]);
if (count($doc->getElementById($id_searched)) == 0) {
if ($doc->getElementById($id_searched) == null) {
$parentl = implode("_", array_slice(explode(".", $mparts[1]), 0, -1));
$find = $doc->getElementById("node_".$parentl);
$founded = 0;
if ($find) {
$founded = count($find);
} else {
$founded = 0;
}
// If no parent yet, this is the root
if ($founded == 0) {
if ($doc->getElementById("node_".$parentl) == null) {
$current_node = $doc->createElement('node');
$current_node->setAttribute("name", $mparts[2]);
$current_node->setAttribute("g", $mparts[4]);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment