39 include_once(
"./Services/COPage/exceptions/class.ilCOPageException.php");
45 include_once(
"./Services/COPage/exceptions/class.ilCOPageException.php");
59 $this->parent_type = $a_val;
79 $this->parent_id = $a_val;
99 $this->master_lang = $a_val;
119 $this->languages = $a_val;
139 if ($a_lang !=
"" && !in_array($a_lang, $this->languages))
141 $this->languages[] = $a_lang;
153 $this->activated = $a_val;
171 $set = $this->db->query(
"SELECT * FROM copg_multilang ".
172 " WHERE parent_type = ".$this->db->quote($this->getParentType(),
"text").
173 " AND parent_id = ".$this->db->quote($this->getParentId(),
"integer")
175 if ($rec = $this->db->fetchAssoc($set))
186 $set = $this->db->query(
"SELECT * FROM copg_multilang_lang ".
187 " WHERE parent_type = ".$this->db->quote($this->getParentType(),
"text").
188 " AND parent_id = ".$this->db->quote($this->getParentId(),
"integer")
190 while ($rec = $this->db->fetchAssoc($set))
201 $this->db->manipulate(
"DELETE FROM copg_multilang ".
202 " WHERE parent_type = ".$this->db->quote($this->getParentType(),
"text").
203 " AND parent_id = ".$this->db->quote($this->getParentId(),
"integer")
205 $this->db->manipulate(
"DELETE FROM copg_multilang_lang ".
206 " WHERE parent_type = ".$this->db->quote($this->getParentType(),
"text").
207 " AND parent_id = ".$this->db->quote($this->getParentId(),
"integer")
218 $this->db->manipulate(
"INSERT INTO copg_multilang ".
219 "(parent_type, parent_id, master_lang) VALUES (".
220 $this->db->quote($this->getParentType(),
"text").
",".
221 $this->db->quote($this->getParentId(),
"integer").
",".
222 $this->db->quote($this->getMasterLanguage(),
"text").
227 $this->db->manipulate(
"INSERT INTO copg_multilang_lang ".
228 "(parent_type, parent_id, lang) VALUES (".
229 $this->db->quote($this->getParentType(),
"text").
",".
230 $this->db->quote($this->getParentId(),
"integer").
",".
231 $this->db->quote(
$lang,
"text").
243 function copy($a_target_parent_type, $a_target_parent_id)
247 $target_ml =
new ilPageMultiLang($a_target_parent_type, $a_target_parent_id);