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 $q =
"DELETE FROM il_object_def";
61 $q =
"DELETE FROM il_object_subobj";
64 $q =
"DELETE FROM il_object_group";
67 $q =
"DELETE FROM il_pluginslot";
70 $q =
"DELETE FROM il_component";
86 $this->current_tag = $a_name;
91 $this->current_object = $a_attribs[
"id"];
92 $q =
"REPLACE INTO il_object_def (id, class_name, component,location,".
93 "checkbox,inherit,translate,devmode,allow_link,allow_copy,rbac,default_pos,default_pres_pos,sideblock,grp,system) VALUES (".
94 $ilDB->quote($a_attribs[
"id"]).
",".
95 $ilDB->quote($a_attribs[
"class_name"]).
",".
96 $ilDB->quote($this->current_component).
",".
97 $ilDB->quote($this->current_component.
"/".$a_attribs[
"dir"]).
",".
98 $ilDB->quote((
int) $a_attribs[
"checkbox"]).
",".
99 $ilDB->quote((
int) $a_attribs[
"inherit"]).
",".
100 $ilDB->quote($a_attribs[
"translate"]).
",".
101 $ilDB->quote((
int) $a_attribs[
"devmode"]).
",".
102 $ilDB->quote((
int) $a_attribs[
"allow_link"]).
",".
103 $ilDB->quote((
int) $a_attribs[
"allow_copy"]).
",".
104 $ilDB->quote((
int) $a_attribs[
"rbac"]).
",".
105 $ilDB->quote((
int) $a_attribs[
"default_pos"]).
",".
106 $ilDB->quote((
int) $a_attribs[
"default_pres_pos"]).
",".
107 $ilDB->quote((
int) $a_attribs[
"sideblock"]).
",".
108 $ilDB->quote($a_attribs[
"group"]).
",".
109 $ilDB->quote((
int) $a_attribs[
"system"]).
")";
114 $ilDB->query(
"INSERT INTO il_object_subobj (parent, subobj, max) VALUES (".
115 $ilDB->quote($this->current_object).
",".
116 $ilDB->quote($a_attribs[
"id"]).
",".
117 $ilDB->quote($a_attribs[
"max"]).
")");
121 $ilDB->query(
"INSERT INTO il_object_subobj (parent, subobj, max) VALUES (".
122 $ilDB->quote($a_attribs[
"id"]).
",".
123 $ilDB->quote($this->current_object).
",".
124 $ilDB->quote($a_attribs[
"max"]).
")");
128 $ilDB->query(
"INSERT INTO il_object_group (id, name, default_pres_pos) VALUES (".
129 $ilDB->quote($a_attribs[
"id"]).
",".
130 $ilDB->quote($a_attribs[
"name"]).
",".
131 $ilDB->quote($a_attribs[
"default_pres_pos"]).
136 $this->current_object = $a_attribs[
"id"];
137 $q =
"INSERT INTO il_pluginslot (component, id, name) VALUES (".
138 $ilDB->quote($this->current_component).
",".
139 $ilDB->quote($a_attribs[
"id"]).
",".
140 $ilDB->quote($a_attribs[
"name"]).
")";
168 $a_data = preg_replace(
"/\n/",
"",$a_data);
169 $a_data = preg_replace(
"/\t+/",
"",$a_data);
173 switch ($this->current_tag)