38 $this->name = $a_name;
39 $this->type = $a_type;
46 xml_set_object($a_xml_parser,$this);
47 xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
48 xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
58 $ilDB->manipulate(
"DELETE FROM il_object_def");
60 $ilDB->manipulate(
"DELETE FROM il_object_subobj");
62 $ilDB->manipulate(
"DELETE FROM il_object_group");
64 $ilDB->manipulate(
"DELETE FROM il_pluginslot");
66 $ilDB->manipulate(
"DELETE FROM il_component");
68 $ilDB->manipulate(
"DELETE FROM il_event_handling");
78 $ilDB->manipulateF(
"DELETE FROM il_object_def WHERE id = %s",
79 array(
"text"), array($a_id));
81 $ilDB->manipulateF(
"DELETE FROM il_object_subobj WHERE parent = %s OR subobj = %s",
82 array(
"text",
"text"), array($a_id, $a_id));
97 $this->current_tag = $a_name;
104 if($a_attribs[
"repository"] === NULL)
106 $a_attribs[
"repository"] =
true;
108 if($a_attribs[
"workspace"] === NULL)
110 $a_attribs[
"workspace"] =
false;
113 $this->current_object = $a_attribs[
"id"];
114 $ilDB->manipulateF(
"INSERT INTO il_object_def (id, class_name, component,location,".
115 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos,".
116 "default_pres_pos,sideblock,grp,system,export,repository,workspace,administration) VALUES ".
117 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
118 array(
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
119 "integer",
"integer",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
"integer",
'integer'),
122 $a_attribs[
"class_name"],
123 $this->current_component,
124 $this->current_component.
"/".$a_attribs[
"dir"],
125 (
int) $a_attribs[
"checkbox"],
126 (
int) $a_attribs[
"inherit"],
127 $a_attribs[
"translate"],
128 (
int) $a_attribs[
"devmode"],
129 (
int) $a_attribs[
"allow_link"],
130 (
int) $a_attribs[
"allow_copy"],
131 (
int) $a_attribs[
"rbac"],
132 (
int) $a_attribs[
"default_pos"],
133 (
int) $a_attribs[
"default_pres_pos"],
134 (
int) $a_attribs[
"sideblock"],
136 (
int) $a_attribs[
"system"],
137 (
int) $a_attribs[
"export"],
138 (
int) $a_attribs[
"repository"],
139 (
int) $a_attribs[
"workspace"],
140 (
int) $a_attribs[
'administration']
145 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
146 array(
"text",
"text",
"integer"),
147 array($this->current_object, $a_attribs[
"id"], (
int) $a_attribs[
"max"]));
151 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
152 array(
"text",
"text",
"integer"),
153 array($a_attribs[
"id"], $this->current_object, (
int) $a_attribs[
"max"]));
157 $ilDB->manipulateF(
"INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
158 array(
"text",
"text",
"integer"),
159 array($a_attribs[
"id"], $a_attribs[
"name"], $a_attribs[
"default_pres_pos"]));
163 $this->current_object = $a_attribs[
"id"];
164 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (".
165 $ilDB->quote($this->current_component,
"text").
",".
166 $ilDB->quote($a_attribs[
"id"],
"text").
",".
167 $ilDB->quote($a_attribs[
"name"],
"text").
")";
168 $ilDB->manipulate($q);
172 $component = $a_attribs[
"component"];
175 $component = $this->current_component;
177 $q =
"INSERT INTO il_event_handling (component, type, id) VALUES (".
178 $ilDB->quote($component,
"text").
",".
179 $ilDB->quote($a_attribs[
"type"],
"text").
",".
180 $ilDB->quote($a_attribs[
"id"],
"text").
")";
181 $ilDB->manipulate($q);
208 $a_data = preg_replace(
"/\n/",
"",$a_data);
209 $a_data = preg_replace(
"/\t+/",
"",$a_data);
213 switch ($this->current_tag)