23 $set = $ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
24 while ($rec = $ilDB->fetchAssoc($set)) {
25 $set2 = $ilDB->query(
"SELECT * FROM style_char WHERE " .
26 "style_id = " . $ilDB->quote($rec[
"obj_id"],
"integer") .
" AND " .
27 "characteristic = " . $ilDB->quote($a_class,
"text") .
" AND " .
28 "type = " . $ilDB->quote(
$a_type,
"text"));
29 if (!$ilDB->fetchAssoc($set2)) {
30 $q =
"INSERT INTO style_char (style_id, type, characteristic, hide)" .
32 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
33 $ilDB->quote(
$a_type,
"text") .
"," .
34 $ilDB->quote($a_class,
"text") .
"," .
35 $ilDB->quote($a_hide,
"integer") .
")";
36 $ilDB->manipulate($q);
39 "SELECT * FROM style_parameter WHERE " .
40 "style_id = " . $ilDB->quote($rec[
"obj_id"],
"integer") .
" AND " .
41 "type = " . $ilDB->quote(
$a_type,
"text") .
" AND " .
42 "class = " . $ilDB->quote($a_orig_class,
"text") .
" AND " .
43 "tag = " . $ilDB->quote($a_tag,
"text")
45 while ($rec3 = $ilDB->fetchAssoc($set3)) {
46 $spid = $ilDB->nextId(
"style_parameter");
47 $q =
"INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)" .
49 $ilDB->quote($spid,
"integer") .
"," .
50 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
51 $ilDB->quote($rec3[
"type"],
"text") .
"," .
52 $ilDB->quote($a_class,
"text") .
"," .
53 $ilDB->quote($a_tag,
"text") .
"," .
54 $ilDB->quote($rec3[
"parameter"],
"text") .
"," .
55 $ilDB->quote($rec3[
"value"],
"text") .
57 $ilDB->manipulate($q);
73 if ($a_parameters ==
"") {
74 $a_parameters =
array();
77 $set = $ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
78 while ($rec = $ilDB->fetchAssoc($set)) {
79 $set2 = $ilDB->query(
"SELECT * FROM style_char WHERE " .
80 "style_id = " . $ilDB->quote($rec[
"obj_id"],
"integer") .
" AND " .
81 "characteristic = " . $ilDB->quote($a_class,
"text") .
" AND " .
82 "type = " . $ilDB->quote(
$a_type,
"text"));
83 if (!$ilDB->fetchAssoc($set2)) {
84 $q =
"INSERT INTO style_char (style_id, type, characteristic, hide)" .
86 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
87 $ilDB->quote(
$a_type,
"text") .
"," .
88 $ilDB->quote($a_class,
"text") .
"," .
89 $ilDB->quote($a_hide,
"integer") .
")";
91 $ilDB->manipulate($q);
92 foreach ($a_parameters as $k => $v) {
93 $spid = $ilDB->nextId(
"style_parameter");
94 $q =
"INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)" .
96 $ilDB->quote($spid,
"integer") .
"," .
97 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
98 $ilDB->quote(
$a_type,
"text") .
"," .
99 $ilDB->quote($a_class,
"text") .
"," .
100 $ilDB->quote($a_tag,
"text") .
"," .
101 $ilDB->quote($k,
"text") .
"," .
102 $ilDB->quote($v,
"text") .
105 $ilDB->manipulate($q);
Update class for step 3136.
static copyStyleClass($a_orig_class, $a_class, $a_type, $a_tag, $a_hide=0)
Create style class GlossaryLink, link, IntLink.
addStyleClass($a_class, $a_type, $a_tag, $a_parameters="", $a_hide=0)
Add style class.
Create styles array
The data for the language used.