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(),
'integer').
" 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 $query =
"DELETE FROM object_translation WHERE obj_id= ".
111 $ilDB->quote($this->
getId(),
'integer');
120 $query =
"INSERT INTO object_translation ".
121 "(obj_id,title,description,lang_code,lang_default) ".
123 "(".$ilDB->quote($this->
getId(),
'integer').
",".
124 $ilDB->quote($a_title,
'text').
",".
125 $ilDB->quote($a_desc,
'text').
",".
126 $ilDB->quote($a_lang,
'text').
",".
127 $ilDB->quote($a_lang_default,
'integer').
")";
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,
'integer').
" ".
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,
'integer').
" ".
159 $ilDB->quote($this->ilias->account->getPref(
"language"),
'text').
" ".
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,
'integer').
" ".
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,
'integer').
" ".
188 $ilDB->quote($this->ilias->account->getPref(
"language"),
'text').
" ".
189 "AND NOT lang_default = 1";
190 $r = $this->ilias->db->query(
$q);