34 require_once
"./classes/class.ilObject.php";
47 $this->
ilObject($a_id,$a_call_by_reference);
63 if (!parent::delete())
84 $q =
"SELECT * FROM object_translation WHERE obj_id = ".
85 $ilDB->quote($this->
getId()).
" ORDER BY lang_default DESC";
86 $r = $this->ilias->db->query($q);
92 $data[
"Fobject"][$num]= array(
"title" => $row->title,
94 "lang" => $row->lang_code
100 $data[
"default_language"] = 0;
110 $q =
"DELETE FROM object_translation WHERE obj_id= ".
111 $ilDB->quote($this->
getId());
112 $this->ilias->db->query($q);
120 $q =
"INSERT INTO object_translation ".
121 "(obj_id,title,description,lang_code,lang_default) ".
123 "(".$ilDB->quote($this->
getId()).
",".
124 $ilDB->quote($a_title).
",".
125 $ilDB->quote($a_desc).
",".
126 $ilDB->quote($a_lang).
",".
127 $ilDB->quote($a_lang_default).
")";
128 $this->ilias->db->query($q);
135 $q =
"SELECT obj_id FROM object_data ".
136 "WHERE type = 'adm'";
137 $r = $this->ilias->db->query($q);
149 $q =
"SELECT title,description FROM object_translation ".
150 "WHERE obj_id = ".$ilDB->quote(
$id).
" ".
151 "AND lang_default = 1";
152 $r = $this->ilias->db->query($q);
156 $q =
"SELECT title,description FROM object_translation ".
157 "WHERE obj_id = ".$ilDB->quote(
$id).
" ".
159 $ilDB->quote($this->ilias->account->getPref(
"language")).
" ".
160 "AND NOT lang_default = 1";
161 $r = $this->ilias->db->query($q);
178 $q =
"SELECT title,description FROM object_translation ".
179 "WHERE obj_id = ".$ilDB->quote(
$id).
" ".
180 "AND lang_default = 1";
181 $r = $this->ilias->db->query($q);
183 $description = $row->description;
185 $q =
"SELECT title,description FROM object_translation ".
186 "WHERE obj_id = ".$ilDB->quote(
$id).
" ".
188 $ilDB->quote($this->ilias->account->getPref(
"language")).
" ".
189 "AND NOT lang_default = 1";
190 $r = $this->ilias->db->query($q);