5 require_once
"./Services/Container/classes/class.ilContainer.php";
41 global $ilDB,$ilAppEventHandler;
44 if (!parent::delete())
50 include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
53 $query =
"DELETE FROM object_translation WHERE obj_id = ".$ilDB->quote($this->
getId(),
'integer');
56 $ilAppEventHandler->raise(
'Modules/Category',
58 array(
'object' => $this,
59 'obj_id' => $this->
getId()));
74 $q =
"SELECT * FROM object_translation WHERE obj_id = ".
75 $ilDB->quote($this->
getId(),
'integer').
" ORDER BY lang_default DESC";
76 $r = $this->ilias->db->query($q);
82 $data[
"Fobject"][$num]= array(
"title" =>
$row->title,
83 "desc" =>
$row->description,
84 "lang" =>
$row->lang_code
90 $data[
"default_language"] = 0;
100 $query =
"DELETE FROM object_translation WHERE obj_id= ".
101 $ilDB->quote($this->
getId(),
'integer');
110 $query =
"DELETE FROM object_translation WHERE obj_id= ".
111 $ilDB->quote($this->
getId(),
'integer').
" AND lang_code = ".
112 $ilDB->quote($a_lang,
'text');
123 $a_title =
"NO TITLE";
126 $query =
"INSERT INTO object_translation ".
127 "(obj_id,title,description,lang_code,lang_default) ".
129 "(".$ilDB->quote($this->
getId(),
'integer').
",".
130 $ilDB->quote($a_title,
'text').
",".$ilDB->quote($a_desc,
'text').
",".
131 $ilDB->quote($a_lang,
'text').
",".$ilDB->quote($a_lang_default,
'integer').
")";
144 $a_title =
"NO TITLE";
147 $query =
"UPDATE object_translation ".
148 "SET title = ". $ilDB->quote($a_title,
'text').
",".
149 "description = ".$ilDB->quote($a_desc,
'text').
",".
150 "lang_code = ".$ilDB->quote($a_lang,
'text') .
",".
151 "lang_default = ".$ilDB->quote($a_lang_default,
'integer').
" ".
153 " obj_id = ".$ilDB->quote($this->
getId(),
'integer');
179 if(is_array($translations[
'Fobject']))
181 foreach($translations[
'Fobject'] as $num => $translation)
183 $new_obj->addTranslation($translation[
'title'],$translation[
'desc'],$translation[
'lang'],$first);
207 include_once
'./Services/Object/classes/class.ilObjectActivation.php';