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");
76 $ilDB->manipulateF(
"DELETE FROM il_object_def WHERE id = %s",
77 array(
"text"), array($a_id));
79 $ilDB->manipulateF(
"DELETE FROM il_object_subobj WHERE parent = %s OR subobj = %s",
80 array(
"text",
"text"), array($a_id, $a_id));
95 $this->current_tag = $a_name;
102 if($a_attribs[
"repository"] === NULL)
104 $a_attribs[
"repository"] =
true;
106 if($a_attribs[
"workspace"] === NULL)
108 $a_attribs[
"workspace"] =
false;
111 $this->current_object = $a_attribs[
"id"];
112 $ilDB->manipulateF(
"INSERT INTO il_object_def (id, class_name, component,location,".
113 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos,".
114 "default_pres_pos,sideblock,grp,system,export,repository,workspace,administration) VALUES ".
115 "(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",
116 array(
"text",
"text",
"text",
"text",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
117 "integer",
"integer",
"integer",
"integer",
"text",
"integer",
"integer",
"integer",
"integer",
'integer'),
120 $a_attribs[
"class_name"],
121 $this->current_component,
122 $this->current_component.
"/".$a_attribs[
"dir"],
123 (
int) $a_attribs[
"checkbox"],
124 (
int) $a_attribs[
"inherit"],
125 $a_attribs[
"translate"],
126 (
int) $a_attribs[
"devmode"],
127 (
int) $a_attribs[
"allow_link"],
128 (
int) $a_attribs[
"allow_copy"],
129 (
int) $a_attribs[
"rbac"],
130 (
int) $a_attribs[
"default_pos"],
131 (
int) $a_attribs[
"default_pres_pos"],
132 (
int) $a_attribs[
"sideblock"],
134 (
int) $a_attribs[
"system"],
135 (
int) $a_attribs[
"export"],
136 (
int) $a_attribs[
"repository"],
137 (
int) $a_attribs[
"workspace"],
138 (
int) $a_attribs[
'administration']
143 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
144 array(
"text",
"text",
"integer"),
145 array($this->current_object, $a_attribs[
"id"], (
int) $a_attribs[
"max"]));
149 $ilDB->manipulateF(
"INSERT INTO il_object_subobj (parent, subobj, mmax) VALUES (%s,%s,%s)",
150 array(
"text",
"text",
"integer"),
151 array($a_attribs[
"id"], $this->current_object, (
int) $a_attribs[
"max"]));
155 $ilDB->manipulateF(
"INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (%s,%s,%s)",
156 array(
"text",
"text",
"integer"),
157 array($a_attribs[
"id"], $a_attribs[
"name"], $a_attribs[
"default_pres_pos"]));
161 $this->current_object = $a_attribs[
"id"];
162 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (".
163 $ilDB->quote($this->current_component,
"text").
",".
164 $ilDB->quote($a_attribs[
"id"],
"text").
",".
165 $ilDB->quote($a_attribs[
"name"],
"text").
")";
166 $ilDB->manipulate($q);
193 $a_data = preg_replace(
"/\n/",
"",$a_data);
194 $a_data = preg_replace(
"/\t+/",
"",$a_data);
198 switch ($this->current_tag)