18 "copage" => array(
"class" =>
"ilCOPageDefReader")
25 foreach ($this->readers as $k =>
$reader)
28 $class_path =
"./setup/classes/class.".$class.
".php";
29 include_once($class_path);
30 $this->readers[$k][
"reader"] =
new $class();
33 $this->name = $a_name;
34 $this->type = $a_type;
41 xml_set_object($a_xml_parser,$this);
42 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
43 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
53 $ilDB->manipulate(
"DELETE FROM il_object_def");
55 $ilDB->manipulate(
"DELETE FROM il_object_subobj");
57 $ilDB->manipulate(
"DELETE FROM il_object_group");
59 $ilDB->manipulate(
"DELETE FROM il_pluginslot");
61 $ilDB->manipulate(
"DELETE FROM il_component");
63 $ilDB->manipulate(
"DELETE FROM il_event_handling");
65 $ilDB->manipulate(
"DELETE FROM il_object_sub_type");
67 foreach ($this->readers as $k =>
$reader)
69 $this->readers[$k][
"reader"]->clearTables();
80 $ilDB->manipulateF(
"DELETE FROM il_object_def WHERE id = %s",
81 array(
"text"), array($a_id));
83 $ilDB->manipulateF(
"DELETE FROM il_object_subobj WHERE parent = %s OR subobj = %s",
84 array(
"text",
"text"), array($a_id, $a_id));
98 $this->current_tag = $a_name;
101 if (isset($this->readers[$a_name]))
103 $this->current_reader = $a_name;
107 if ($this->current_reader !=
"")
110 $this->current_component);
120 if($a_attribs[
"repository"] === NULL)
122 $a_attribs[
"repository"] =
true;
124 if($a_attribs[
"workspace"] === NULL)
126 $a_attribs[
"workspace"] =
false;
129 $this->current_object = $a_attribs[
"id"];
130 $ilDB->manipulateF(
"INSERT INTO il_object_def (id, class_name, component,location,".
131 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos,".
132 "default_pres_pos,sideblock,grp,system,export,repository,workspace,administration,amet) VALUES ".
133 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
134 array(
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
135 "integer",
"integer",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
"integer",
'integer',
'integer'),
138 $a_attribs[
"class_name"],
139 $this->current_component,
140 $this->current_component.
"/".$a_attribs[
"dir"],
141 (
int) $a_attribs[
"checkbox"],
142 (
int) $a_attribs[
"inherit"],
143 $a_attribs[
"translate"],
144 (
int) $a_attribs[
"devmode"],
145 (
int) $a_attribs[
"allow_link"],
146 (
int) $a_attribs[
"allow_copy"],
147 (
int) $a_attribs[
"rbac"],
148 (
int) $a_attribs[
"default_pos"],
149 (
int) $a_attribs[
"default_pres_pos"],
150 (
int) $a_attribs[
"sideblock"],
152 (
int) $a_attribs[
"system"],
153 (
int) $a_attribs[
"export"],
154 (
int) $a_attribs[
"repository"],
155 (
int) $a_attribs[
"workspace"],
156 (
int) $a_attribs[
'administration'],
157 (
int) $a_attribs[
'amet']
162 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
163 array(
"text",
"text",
"integer"),
164 array($this->current_object, $a_attribs[
"id"], (
int) $a_attribs[
"max"]));
168 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
169 array(
"text",
"text",
"integer"),
170 array($a_attribs[
"id"], $this->current_object, (
int) $a_attribs[
"max"]));
174 $ilDB->manipulateF(
"INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
175 array(
"text",
"text",
"integer"),
176 array($a_attribs[
"id"], $a_attribs[
"name"], $a_attribs[
"default_pres_pos"]));
180 $this->current_object = $a_attribs[
"id"];
181 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (".
182 $ilDB->quote($this->current_component,
"text").
",".
183 $ilDB->quote($a_attribs[
"id"],
"text").
",".
184 $ilDB->quote($a_attribs[
"name"],
"text").
")";
185 $ilDB->manipulate($q);
189 $component = $a_attribs[
"component"];
192 $component = $this->current_component;
194 $q =
"INSERT INTO il_event_handling (component, type, id) VALUES (".
195 $ilDB->quote($component,
"text").
",".
196 $ilDB->quote($a_attribs[
"type"],
"text").
",".
197 $ilDB->quote($a_attribs[
"id"],
"text").
")";
198 $ilDB->manipulate($q);
202 $component = $a_attribs[
"component"];
205 $component = $this->current_component;
207 include_once
"Services/Cron/classes/class.ilCronManager.php";
209 $this->has_cron[$component][] = $a_attribs[
"id"];
213 $ilDB->manipulate(
"INSERT INTO il_object_sub_type ".
214 "(obj_type, sub_type, amet) VALUES (".
215 $ilDB->quote($this->current_object,
"text").
",".
216 $ilDB->quote($a_attribs[
"id"],
"text").
",".
217 $ilDB->quote($a_attribs[
"amet"],
"integer").
233 if ($this->current_reader !=
"")
240 if($a_name ==
"module" || $a_name ==
"service")
242 include_once
"Services/Cron/classes/class.ilCronManager.php";
244 (array)$this->has_cron[$this->current_component]);
249 if (isset($this->readers[$a_name]))
251 $this->current_reader = null;
266 $a_data = preg_replace(
"/\n/",
"",$a_data);
267 $a_data = preg_replace(
"/\t+/",
"",$a_data);
271 switch ($this->current_tag)