ILIAS  trunk Revision v11.0_alpha-1769-g99a433fe2dc
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\OnScreenChat\Setup\UpdateSteps Class Reference
+ Inheritance diagram for ILIAS\OnScreenChat\Setup\UpdateSteps:
+ Collaboration diagram for ILIAS\OnScreenChat\Setup\UpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Detailed Description

Definition at line 27 of file UpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\OnScreenChat\Setup\UpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 29 of file UpdateSteps.php.

References ILIAS\$db.

29  : void
30  {
31  $this->db = $db;
32  }

◆ step_1()

ILIAS\OnScreenChat\Setup\UpdateSteps::step_1 ( )

Definition at line 34 of file UpdateSteps.php.

References ilDBConstants\T_TEXT.

34  : void
35  {
36  $replace = [
37  '&lt;' => '<',
38  '&gt;' => '>',
39  '&amp;' => '&',
40  '&quot;' => '"',
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  }

The documentation for this class was generated from the following file: