Example #1
0
 $tag1->loadObject($where);
 if (!$tag1->_id) {
     $tag1->name = $line["tag_name_1"];
     $tag1->object_class = $object_class;
     if ($msg = $tag1->store()) {
         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);