CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING); continue; } else { CAppUI::setMsg("{$tag1->_class}-msg-create", UI_MSG_OK); } } // TAG LEVEL 2 $tag2 = new CTag(); $ds = $tag2->_spec->ds; $where = array("name" => $ds->prepare("=%", $line["tag_name_2"]), "object_class" => $ds->prepare("=%", $object_class)); $tag2->loadObject($where); if (!$tag2->_id) { $tag2->name = $line["tag_name_2"]; $tag2->object_class = $object_class; $tag2->parent_id = $tag1->_id; if ($msg = $tag2->store()) { CAppUI::setMsg("Ligne {$line_number} : {$msg}", UI_MSG_WARNING); continue; } else { CAppUI::setMsg("{$tag2->_class}-msg-create", UI_MSG_OK); } } // CONCEPT $concept_prop = CValue::read($prop_map, CMbString::lower($line["concept_type"])); if (!$concept_prop) { CAppUI::setMsg("Ligne {$line_number} : type de concept invalide : <strong>{$line['concept_type']}</strong>", UI_MSG_WARNING); continue; } // If list name provided, it needs to exist if ($line["list_name"]) { $_list = new CExList();
if ($msg) { CAppUI::setMsg($msg, UI_MSG_ERROR); $results[$i]["error"] = $msg; $i++; continue; } CAppUI::setMsg("Favori créé", UI_MSG_OK); } $tag_name = $results[$i]["tag"]; if ($tag_name) { $tag = new CTag(); $tag->name = $tag_name; $tag->object_class = $object->_class; $tag->loadMatchingObjectEsc(); if (!$tag->_id) { $msg = $tag->store(); if ($msg) { CAppUI::setMsg($msg, UI_MSG_ERROR); $results[$i]["error"] = $msg; $i++; continue; } } $tag_item = new CTagItem(); $tag_item->tag_id = $tag->_id; $tag_item->object_id = $object->_id; $tag_item->object_class = $object->_class; $tag_item->loadMatchingObjectEsc(); if (!$tag_item->_id) { $msg = $tag_item->store(); if ($msg) {