Update class for step 3136.
More...
|
static | copyStyleClass ($a_orig_class, $a_class, $a_type, $a_tag, $a_hide=0) |
| Create style class GlossaryLink, link, IntLink. More...
|
|
Update class for step 3136.
- Author
- alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
- Version
- $Id$
Definition at line 11 of file class.ilDBUpdate3136.php.
◆ addStyleClass()
ilDBUpdate3136::addStyleClass |
( |
|
$a_class, |
|
|
|
$a_type, |
|
|
|
$a_tag, |
|
|
|
$a_parameters = "" , |
|
|
|
$a_hide = 0 |
|
) |
| |
Add style class.
- Parameters
-
return
Definition at line 71 of file class.ilDBUpdate3136.php.
72 {
74
75 if ($a_parameters == "")
76 {
77 $a_parameters = array();
78 }
79
80 $set =
$ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
81 while ($rec =
$ilDB->fetchAssoc($set))
82 {
83 $set2 =
$ilDB->query(
"SELECT * FROM style_char WHERE ".
84 "style_id = ".
$ilDB->quote($rec[
"obj_id"],
"integer").
" AND ".
85 "characteristic = ".$ilDB->quote($a_class, "text")." AND ".
86 "type = ".$ilDB->quote(
$a_type,
"text"));
87 if (!
$ilDB->fetchAssoc($set2))
88 {
89 $q = "INSERT INTO style_char (style_id, type, characteristic, hide)".
90 " VALUES (".
91 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
93 $ilDB->quote($a_class,
"text").
",".
94 $ilDB->quote($a_hide,
"integer").
")";
95
96 $ilDB->manipulate($q);
97 foreach ($a_parameters as $k => $v)
98 {
99 $spid =
$ilDB->nextId(
"style_parameter");
100 $q = "INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)".
101 " VALUES (".
102 $ilDB->quote($spid,
"integer").
",".
103 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
105 $ilDB->quote($a_class,
"text").
",".
106 $ilDB->quote($a_tag,
"text").
",".
107 $ilDB->quote($k,
"text").
",".
108 $ilDB->quote($v,
"text").
109 ")";
110
111 $ilDB->manipulate($q);
112 }
113 }
114 }
115 }
References $a_type, and $ilDB.
◆ copyStyleClass()
static ilDBUpdate3136::copyStyleClass |
( |
|
$a_orig_class, |
|
|
|
$a_class, |
|
|
|
$a_type, |
|
|
|
$a_tag, |
|
|
|
$a_hide = 0 |
|
) |
| |
|
static |
Create style class GlossaryLink, link, IntLink.
- Parameters
-
return
Definition at line 19 of file class.ilDBUpdate3136.php.
20 {
22
23 $set =
$ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
24 while ($rec =
$ilDB->fetchAssoc($set))
25 {
26 $set2 =
$ilDB->query(
"SELECT * FROM style_char WHERE ".
27 "style_id = ".
$ilDB->quote($rec[
"obj_id"],
"integer").
" AND ".
28 "characteristic = ".$ilDB->quote($a_class, "text")." AND ".
29 "type = ".$ilDB->quote(
$a_type,
"text"));
30 if (!
$ilDB->fetchAssoc($set2))
31 {
32 $q = "INSERT INTO style_char (style_id, type, characteristic, hide)".
33 " VALUES (".
34 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
36 $ilDB->quote($a_class,
"text").
",".
37 $ilDB->quote($a_hide,
"integer").
")";
38 $ilDB->manipulate($q);
39
40 $set3 =
$ilDB->query(
"SELECT * FROM style_parameter WHERE ".
41 "style_id = ".
$ilDB->quote($rec[
"obj_id"],
"integer").
" AND ".
42 "type = ".$ilDB->quote(
$a_type,
"text").
" AND ".
43 "class = ".$ilDB->quote($a_orig_class, "text")." AND ".
44 "tag = ".$ilDB->quote($a_tag, "text")
45 );
46 while ($rec3 =
$ilDB->fetchAssoc($set3))
47 {
48 $spid =
$ilDB->nextId(
"style_parameter");
49 $q = "INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)".
50 " VALUES (".
51 $ilDB->quote($spid,
"integer").
",".
52 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
53 $ilDB->quote($rec3[
"type"],
"text").
",".
54 $ilDB->quote($a_class,
"text").
",".
55 $ilDB->quote($a_tag,
"text").
",".
56 $ilDB->quote($rec3[
"parameter"],
"text").
",".
57 $ilDB->quote($rec3[
"value"],
"text").
58 ")";
59 $ilDB->manipulate($q);
60 }
61 }
62 }
63 }
References $a_type, and $ilDB.
The documentation for this class was generated from the following file: