ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
UpdateSteps.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\OnScreenChat\Setup
;
22
23
use
ilDatabaseUpdateSteps
;
24
use
ilDBInterface
;
25
use
ilDBConstants
;
26
27
class
UpdateSteps
implements
ilDatabaseUpdateSteps
28
{
29
public
function
prepare
(
ilDBInterface
$db
): void
30
{
31
$this->db =
$db
;
32
}
33
34
public
function
step_1
(): void
35
{
36
$replace = [
37
'<'
=>
'<'
,
38
'>'
=>
'>'
,
39
'&'
=>
'&'
,
40
'"'
=>
'"'
,
41
];
42
43
$replaced_message =
'message'
;
44
foreach
($replace as $from => $to) {
45
$replaced_message = sprintf(
46
'REPLACE(%s, %s, %s)'
,
47
$replaced_message,
48
$this->db->quote($from,
ilDBConstants::T_TEXT
),
49
$this->db->quote($to,
ilDBConstants::T_TEXT
)
50
);
51
}
52
53
$this->db->manipulate(
'UPDATE osc_messages SET message = '
. $replaced_message);
54
}
55
}
ILIAS\OnScreenChat\Setup\UpdateSteps\prepare
prepare(ilDBInterface $db)
Definition:
UpdateSteps.php:29
ilDBConstants\T_TEXT
const T_TEXT
Definition:
class.ilDBConstants.php:56
ilDBConstants
ILIAS\OnScreenChat\Setup\UpdateSteps\step_1
step_1()
Definition:
UpdateSteps.php:34
ilDBInterface
ilDatabaseUpdateSteps
ILIAS\Setup\UpdateSteps
Definition:
UpdateSteps.php:27
ILIAS\OnScreenChat\Setup
Definition:
Agent.php:21
ILIAS\$db
$db
Definition:
class.ilias.php:60
components
ILIAS
OnScreenChat
classes
Setup
UpdateSteps.php
Generated on Sat Apr 5 2025 23:02:45 for ILIAS by
1.8.13 (using
Doxyfile
)