50 if(isset(self::$cached_values[$a_obj_id]))
52 return self::$cached_values[$a_obj_id];
54 $query =
"SELECT field_id,value FROM adv_md_values ".
55 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer');
58 self::$cached_values[$a_obj_id] = array();
61 self::$cached_values[$a_obj_id][
$row->field_id] =
$row->value;
63 return self::$cached_values[$a_obj_id];
79 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php');
80 include_once(
'./Services/AdvancedMetaData/classes/class.ilAdvancedMDValue.php');
85 $ilLog->write(__METHOD__.
': No advanced meta data found.');
89 $ilLog->write(__METHOD__.
': Start cloning advanced meta data.');
91 foreach(self::_getValuesByObjId($a_source_id) as $field_id => $value)
93 if(!in_array($field_id,$defs))
98 $new_value->setValue($value);
120 $query =
"SELECT field_id FROM adv_md_record amr ".
121 "JOIN adv_md_record_objs amro ON amr.record_id = amro.record_id ".
122 "JOIN adv_mdf_definition amfd ON amr.record_id = amfd.record_id ".
124 "AND obj_type = ".$ilDB->quote(
$type ,
'text').
" ";
131 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValue.php');
133 $value->appendXML($xml_writer);
135 $xml_writer->
xmlEndTag(
'AdvancedMetaData');
150 $query =
"SELECT obj_id,field_id,value FROM adv_md_values ".
151 "WHERE ".$ilDB->in(
'obj_id',$obj_ids,
false,
'integer');
156 self::$cached_values[
$row->obj_id][
$row->field_id] =
$row->value;
174 $query =
"DELETE FROM adv_md_values ".
175 "WHERE field_id = ".$ilDB->quote($a_field_id ,
'integer').
" ";
191 $query =
"DELETE FROM adv_md_values ".
192 "WHERE obj_id = ".$ilDB->quote($a_obj_id ,
'integer').
" ";