ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilNotificationUpdateSteps Class Reference
+ Inheritance diagram for ilNotificationUpdateSteps:
+ Collaboration diagram for ilNotificationUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
 step_10 ()
 
 step_11 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 23 of file ilNotificationUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilNotificationUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 27 of file ilNotificationUpdateSteps.php.

27 : void
28 {
29 $this->db = $db;
30 }

References $db.

◆ step_1()

ilNotificationUpdateSteps::step_1 ( )

Definition at line 32 of file ilNotificationUpdateSteps.php.

32 : void
33 {
34 // Creation of administration node forced by \ilTreeAdminNodeAddedObjective
35 }

◆ step_10()

ilNotificationUpdateSteps::step_10 ( )

Definition at line 160 of file ilNotificationUpdateSteps.php.

160 : void
161 {
162 if (!$this->db->tableColumnExists('notification_osd', 'identification')) {
163 $this->db->addTableColumn('notification_osd', 'identification', [
164 'type' => ilDBConstants::T_TEXT,
165 'length' => 255,
166 'notnull' => true,
167 'default' => ''
168 ]);
169 }
170
171 $this->db->manipulate('TRUNCATE TABLE notification_osd');
172 }

References ilDBConstants\T_TEXT.

◆ step_11()

ilNotificationUpdateSteps::step_11 ( )

Definition at line 174 of file ilNotificationUpdateSteps.php.

174 : void
175 {
176 $this->db->manipulateF(
177 'DELETE FROM settings WHERE module = %s AND keyword = %s',
179 ['notifications', 'enable_mail']
180 );
181 $this->db->insert('settings', [
182 'module' => [ilDBConstants::T_TEXT, 'notifications'],
183 'keyword' => [ilDBConstants::T_TEXT, 'enable_mail'],
184 'value' => [ilDBConstants::T_TEXT, '1']
185 ]);
186 }

References ilDBConstants\T_TEXT.

◆ step_2()

ilNotificationUpdateSteps::step_2 ( )

Definition at line 37 of file ilNotificationUpdateSteps.php.

37 : void
38 {
39 $this->db->manipulateF(
40 'DELETE FROM settings WHERE module = %s AND keyword = %s',
42 ['notifications', 'enable_mail']
43 );
44 $this->db->manipulateF(
45 'UPDATE settings SET keyword = %s WHERE module = %s AND keyword = %s',
47 ['osd_interval', 'notifications', 'osd_polling_intervall']
48 );
49 $this->db->manipulateF(
50 'UPDATE settings SET module = %s, keyword = %s WHERE module = %s AND keyword = %s',
52 ['notifications', 'play_sound', 'chatroom', 'play_invitation_sound']
53 );
54 $this->db->manipulateF(
55 'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
57 ['play_sound', 'chat_play_invitation_sound']
58 );
59 }

References ilDBConstants\T_TEXT.

◆ step_3()

ilNotificationUpdateSteps::step_3 ( )

Definition at line 61 of file ilNotificationUpdateSteps.php.

61 : void
62 {
63 $this->db->manipulateF(
64 'DELETE FROM notification_usercfg WHERE module = %s',
66 ['osd_main']
67 );
68 ilNotificationSetupHelper::registerType(
69 $this->db,
70 'buddysystem_request',
71 'buddysystem_request',
72 'buddysystem_request_desc',
73 'contact',
74 'set_by_admin'
75 );
76 }

References ilDBConstants\T_TEXT.

◆ step_4()

ilNotificationUpdateSteps::step_4 ( )

Definition at line 78 of file ilNotificationUpdateSteps.php.

78 : void
79 {
80 ilNotificationSetupHelper::registerType(
81 $this->db,
82 'who_is_online',
83 'who_is_online',
84 'who_is_online_desc',
85 'user',
86 'set_by_admin'
87 );
88 $this->db->insert(
89 'notification_usercfg',
90 [
91 'usr_id' => [ilDBConstants::T_INTEGER, -1],
92 'module' => [ilDBConstants::T_TEXT, 'who_is_online'],
93 'channel' => [ilDBConstants::T_TEXT, 'osd']
94 ]
95 );
96 $this->db->manipulateF(
97 'UPDATE notification_osd SET type = %s WHERE type = %s AND serialized LIKE %s',
99 ['who_is_online', 'osd_main', '%icon_usr.svg%']
100 );
101 }

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

◆ step_5()

ilNotificationUpdateSteps::step_5 ( )

Definition at line 103 of file ilNotificationUpdateSteps.php.

103 : void
104 {
105 ilNotificationSetupHelper::registerType(
106 $this->db,
107 'badge_received',
108 'badge_received',
109 'badge_received_desc',
110 'achievement',
111 'set_by_admin'
112 );
113 $this->db->insert(
114 'notification_usercfg',
115 [
116 'usr_id' => [ilDBConstants::T_INTEGER, -1],
117 'module' => [ilDBConstants::T_TEXT, 'badge_received'],
118 'channel' => [ilDBConstants::T_TEXT, 'osd']
119 ]
120 );
121 $this->db->manipulateF(
122 'UPDATE notification_osd SET type = %s WHERE type = %s AND serialized LIKE %s',
124 ['badge_received', 'osd_main', '%icon_bdga.svg%']
125 );
126 }

References ilDBConstants\T_INTEGER, and ilDBConstants\T_TEXT.

◆ step_6()

ilNotificationUpdateSteps::step_6 ( )

Definition at line 128 of file ilNotificationUpdateSteps.php.

128 : void
129 {
130 }

◆ step_7()

ilNotificationUpdateSteps::step_7 ( )

Definition at line 132 of file ilNotificationUpdateSteps.php.

132 : void
133 {
134 $this->db->insert('settings', [
135 'module' => [ilDBConstants::T_TEXT, 'notifications'],
136 'keyword' => [ilDBConstants::T_TEXT, 'enable_mail'],
137 'value' => [ilDBConstants::T_TEXT, '1']
138 ]);
139 }

References ilDBConstants\T_TEXT.

◆ step_8()

ilNotificationUpdateSteps::step_8 ( )

Definition at line 141 of file ilNotificationUpdateSteps.php.

141 : void
142 {
143 $this->db->addIndex('notification_osd', ['usr_id', 'type', 'time_added'], 'i1');
144 }

◆ step_9()

ilNotificationUpdateSteps::step_9 ( )

Definition at line 146 of file ilNotificationUpdateSteps.php.

146 : void
147 {
148 $this->db->manipulateF(
149 "UPDATE settings SET value = CONCAT(value , '000') WHERE keyword = %s",
151 ['osd_interval']
152 );
153 $this->db->manipulateF(
154 'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
156 ['osd_play_sound', 'play_sound']
157 );
158 }

References ilDBConstants\T_TEXT.

Field Documentation

◆ $db

ilDBInterface ilNotificationUpdateSteps::$db
protected

Definition at line 25 of file ilNotificationUpdateSteps.php.

Referenced by prepare().


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