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 69 of file class.ilDBUpdate3136.php.
70 {
72
73 if ($a_parameters == "") {
74 $a_parameters = array();
75 }
76
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 " .
83 if (!
$ilDB->fetchAssoc($set2)) {
84 $q = "INSERT INTO style_char (style_id, type, characteristic, hide)" .
85 " VALUES (" .
86 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
88 $ilDB->quote($a_class,
"text") .
"," .
89 $ilDB->quote($a_hide,
"integer") .
")";
90
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)" .
95 " VALUES (" .
96 $ilDB->quote($spid,
"integer") .
"," .
97 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
99 $ilDB->quote($a_class,
"text") .
"," .
100 $ilDB->quote($a_tag,
"text") .
"," .
101 $ilDB->quote($k,
"text") .
"," .
102 $ilDB->quote($v,
"text") .
103 ")";
104
105 $ilDB->manipulate($q);
106 }
107 }
108 }
109 }
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 $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 " .
29 if (!
$ilDB->fetchAssoc($set2)) {
30 $q = "INSERT INTO style_char (style_id, type, characteristic, hide)" .
31 " VALUES (" .
32 $ilDB->quote($rec[
"obj_id"],
"integer") .
"," .
34 $ilDB->quote($a_class,
"text") .
"," .
35 $ilDB->quote($a_hide,
"integer") .
")";
36 $ilDB->manipulate($q);
37
39 "SELECT * FROM style_parameter WHERE " .
40 "style_id = " .
$ilDB->quote($rec[
"obj_id"],
"integer") .
" AND " .
42 "class = " .
$ilDB->quote($a_orig_class,
"text") .
" AND " .
43 "tag = " .
$ilDB->quote($a_tag,
"text")
44 );
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)" .
48 " VALUES (" .
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") .
56 ")";
57 $ilDB->manipulate($q);
58 }
59 }
60 }
61 }
References $a_type, and $ilDB.
The documentation for this class was generated from the following file: