34 require_once
"./Services/Object/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($ilUser->getCurrentLanguage(),
'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);
addHeaderTitleTranslation($a_title, $a_desc, $a_lang, $a_lang_default)
Class ilObject Basic functions for all objects.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
ilObject($a_id=0, $a_reference=true)
Constructor public.
const DB_FETCHMODE_OBJECT
_getHeaderTitleDescription()
ilObjSystemFolder($a_id, $a_call_by_reference=true)
Constructor public.
getId()
get object id public
redirection script todo: (a better solution should control the processing via a xml file) ...
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
removeHeaderTitleTranslations()
getHeaderTitleTranslations()
get all translations for header title