34 require_once
"./Services/Object/classes/class.ilObject.php";
47 $this->
ilObject($a_id,$a_call_by_reference);
63 if (!parent::delete())
80 function getHeaderTitleTranslations()
87 $q =
"SELECT * FROM object_translation WHERE obj_id = ".
88 $ilDB->quote($this->
getId(),
'integer').
" ORDER BY lang_default DESC";
89 $r = $ilDB->query($q);
93 while (
$row = $ilDB->fetchObject($r))
95 $data[
"Fobject"][$num]= array(
"title" =>
$row->title,
97 "lang" =>
$row->lang_code
103 $data[
"default_language"] = 0;
105 return $data ? $data : array();
113 $query =
"DELETE FROM object_translation WHERE obj_id= ".
114 $ilDB->quote($this->
getId(),
'integer');
123 $query =
"INSERT INTO object_translation ".
124 "(obj_id,title,description,lang_code,lang_default) ".
126 "(".$ilDB->quote($this->
getId(),
'integer').
",".
127 $ilDB->quote($a_title,
'text').
",".
128 $ilDB->quote($a_desc,
'text').
",".
129 $ilDB->quote($a_lang,
'text').
",".
130 $ilDB->quote($a_lang_default,
'integer').
")";
143 $q =
"SELECT obj_id FROM object_data WHERE type = " . $ilDB->quote(
'adm',
'text');
144 $r = $ilDB->query($q);
145 $row = $ilDB->fetchObject($r);
150 function _getHeaderTitle()
158 $id = ilObjSystemFolder::_getId();
160 $q =
"SELECT title,description FROM object_translation ".
161 "WHERE obj_id = ".$ilDB->quote(
$id,
'integer').
" ".
162 "AND lang_default = 1";
163 $r = $ilDB->query($q);
164 $row = $ilDB->fetchObject($r);
167 $q =
"SELECT title,description FROM object_translation ".
168 "WHERE obj_id = ".$ilDB->quote(
$id,
'integer').
" ".
170 $ilDB->quote($ilUser->getCurrentLanguage(),
'text').
" ".
171 "AND NOT lang_default = 1";
172 $r = $ilDB->query($q);
173 $row = $ilDB->fetchObject($r);
183 function _getHeaderTitleDescription()
190 $id = ilObjSystemFolder::_getId();
192 $q =
"SELECT title,description FROM object_translation ".
193 "WHERE obj_id = ".$ilDB->quote(
$id,
'integer').
" ".
194 "AND lang_default = 1";
195 $r = $ilDB->query($q);
196 $row = $ilDB->fetchObject($r);
197 $description =
$row->description;
199 $q =
"SELECT title,description FROM object_translation ".
200 "WHERE obj_id = ".$ilDB->quote(
$id,
'integer').
" ".
202 $ilDB->quote($this->ilias->account->getPref(
"language"),
'text').
" ".
203 "AND NOT lang_default = 1";
204 $r = $ilDB->query($q);
205 $row = $ilDB->fetchObject($r);