ILIAS
trunk Revision v11.0_alpha-2645-g16283d3b3f8
◀ ilDoc Overview
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 Mon Sep 1 2025 23:02:38 for ILIAS by
1.8.13 (using
Doxyfile
)