25 require_once
"./Services/Container/classes/class.ilContainer.php";
51 $ilBench->start(
"Core",
"ilObjCategory_Constructor");
56 $ilBench->stop(
"Core",
"ilObjCategory_Constructor");
68 global
$ilDB,$ilAppEventHandler;
71 if (!parent::delete())
77 include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
80 $query =
"DELETE FROM object_translation WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer');
83 $ilAppEventHandler->raise(
'Modules/Category',
85 array(
'object' => $this,
86 'obj_id' => $this->
getId()));
101 $q =
"SELECT * FROM object_translation WHERE obj_id = ".
102 $ilDB->quote($this->
getId(),
'integer').
" ORDER BY lang_default DESC";
103 $r = $this->ilias->db->query($q);
109 $data[
"Fobject"][$num]= array(
"title" =>
$row->title,
110 "desc" =>
$row->description,
111 "lang" =>
$row->lang_code
117 $data[
"default_language"] = 0;
127 $query =
"DELETE FROM object_translation WHERE obj_id= ".
128 $ilDB->quote($this->
getId(),
'integer');
139 $a_title =
"NO TITLE";
142 $query =
"INSERT INTO object_translation ".
143 "(obj_id,title,description,lang_code,lang_default) ".
145 "(".$ilDB->quote($this->
getId(),
'integer').
",".
146 $ilDB->quote($a_title,
'text').
",".$ilDB->quote($a_desc,
'text').
",".
147 $ilDB->quote($a_lang,
'text').
",".$ilDB->quote($a_lang_default,
'integer').
")";
160 $a_title =
"NO TITLE";
163 $query =
"UPDATE object_translation ".
164 "SET title = ". $ilDB->quote($a_title,
'text').
",".
165 "description = ".$ilDB->quote($a_desc,
'text').
",".
166 "lang_code = ".$ilDB->quote($a_lang,
'text') .
",".
167 "lang_default = ".$ilDB->quote($a_lang_default,
'integer').
" ".
169 " obj_id = ".$ilDB->quote($this->
getId(),
'integer');
185 global
$ilDB,$ilUser;
195 if(is_array($translations[
'Fobject']))
197 foreach($translations[
'Fobject'] as $num => $translation)
199 $new_obj->addTranslation($translation[
'title'],$translation[
'desc'],$translation[
'lang'],$first);