28                 unset($this->object_data_cache[$a_obj_id]);
 
   39                 return (
int) @$this->reference_cache[$a_ref_id];
 
   48                 return @$this->object_data_cache[$a_obj_id][
'title'];
 
   58                 return @$this->object_data_cache[$a_obj_id][
'type'];
 
   67                 return @$this->object_data_cache[$a_obj_id][
'owner'];
 
   76                 return @$this->object_data_cache[$a_obj_id][
'description'];
 
   85                 return @$this->object_data_cache[$a_obj_id][
'last_update'];
 
  100                 #static $not_cached = 0; 
  102                 if(@$this->reference_cache[$a_ref_id])
 
  104                         #echo "Reference ". ++$cached ."cached<br>"; 
  107                 #echo "Reference ". ++$not_cached ." not cached<br>"; 
  122                 static $not_cached = 0;
 
  125                 if(@$this->object_data_cache[$a_obj_id])
 
  127                         #echo "Object ". ++$cached ."cached<br>"; 
  130                 #echo "Object ". ++$not_cached ." not cached<br>"; 
  148                 $query = 
"SELECT obj_id FROM object_reference WHERE ref_id = ".$ilDB->quote($a_ref_id,
'integer');
 
  152                         $this->reference_cache[$a_ref_id] = 
$row[
'obj_id'];
 
  154                 return (
int) @$this->reference_cache[$a_ref_id];
 
  166                 global 
$ilDB, $objDefinition, $ilUser;
 
  168                 if (is_object($ilUser) && $a_lang == 
"")
 
  170                         $a_lang = $ilUser->getLanguage();
 
  173                 $query = 
"SELECT * FROM object_data WHERE obj_id = ".
 
  174                         $ilDB->quote($a_obj_id ,
'integer');
 
  178                         $this->object_data_cache[$a_obj_id][
'title'] = 
$row->title;
 
  179                         $this->object_data_cache[$a_obj_id][
'description'] = 
$row->description;
 
  180                         $this->object_data_cache[$a_obj_id][
'type'] = 
$row->type;
 
  181                         $this->object_data_cache[$a_obj_id][
'owner'] = 
$row->owner;
 
  182                         $this->object_data_cache[$a_obj_id][
'last_update'] = 
$row->last_update;
 
  184                         if (is_object($objDefinition))
 
  186                                 $translation_type = $objDefinition->getTranslationType(
$row->type);
 
  189                         if ($translation_type == 
"db")
 
  191                                 if (!$this->trans_loaded[$a_obj_id])
 
  193                                         $q = 
"SELECT title,description FROM object_translation ".
 
  194                                                  "WHERE obj_id = ".$ilDB->quote($a_obj_id,
'integer').
" ".
 
  195                                                  "AND lang_code = ".$ilDB->quote($a_lang,
'text').
" ".
 
  196                                                  "AND NOT lang_default = 1";
 
  197                                         $r = $ilDB->query($q);
 
  202                                                 $this->object_data_cache[$a_obj_id][
'title'] = 
$row->title;
 
  203                                                 $this->object_data_cache[$a_obj_id][
'description'] = 
$row->description;
 
  205                                         $this->trans_loaded[$a_obj_id] = 
true;
 
  222                 global 
$ilDB, $objDefinition, $ilUser, $tree;
 
  224                 if (is_object($ilUser) && $a_lang == 
"")
 
  226                         $a_lang = $ilUser->getLanguage();
 
  229                 if (!is_array($a_obj_ids)) 
return;
 
  230                 if (count($a_obj_ids) == 0) 
return;
 
  233                 $query = 
"SELECT * FROM object_data ".
 
  234                         "WHERE ".$ilDB->in(
'obj_id',$a_obj_ids,
false,
'integer');
 
  240                         $this->object_data_cache[
$row->obj_id][
'title'] = 
$row->title;
 
  241                         $this->object_data_cache[
$row->obj_id][
'description'] = 
$row->description;
 
  242                         $this->object_data_cache[
$row->obj_id][
'type'] = 
$row->type;
 
  243                         $this->object_data_cache[
$row->obj_id][
'owner'] = 
$row->owner;
 
  244                         $this->object_data_cache[
$row->obj_id][
'last_update'] = 
$row->last_update;
 
  246                         if (is_object($objDefinition))
 
  248                                 $translation_type = $objDefinition->getTranslationType(
$row->type);
 
  251                         if ($translation_type == 
"db")
 
  253                                 $db_trans[
$row->obj_id] = 
$row->obj_id;
 
  256                 if (count($db_trans) > 0)
 
  272                 foreach ($a_obj_ids as $id)
 
  275                         if (!$this->trans_loaded[$id])
 
  278                                 $this->trans_loaded[$id] = 
true;
 
  281                 if (count($obj_ids) > 0)
 
  283                         $q = 
"SELECT obj_id, title, description FROM object_translation ".
 
  284                                  "WHERE ".$ilDB->in(
'obj_id', $obj_ids, 
false, 
'integer').
" ".
 
  285                                  "AND lang_code = ".$ilDB->quote($a_lang, 
'text').
" ".
 
  286                                  "AND NOT lang_default = 1";
 
  287                         $r = $ilDB->query($q);
 
  290                                 $this->object_data_cache[$row2->obj_id][
'title'] = $row2->title;
 
  291                                 $this->object_data_cache[$row2->obj_id][
'description'] = $row2->description;
 
  300                 if (!is_array($a_ref_ids)) 
return;
 
  301                 if (count($a_ref_ids) == 0) 
return;
 
  303                 $query = 
"SELECT ref_id, obj_id FROM object_reference ".
 
  304                         "WHERE ".$ilDB->in(
'ref_id',$a_ref_ids,
false,
'integer');
 
  310                         $this->reference_cache[
$row[
'ref_id']] = $row[
'obj_id'];
 
  312                         $obj_ids[] = $row[
'obj_id'];