ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

References $db.

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

◆ 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 172 of file ilNotificationUpdateSteps.php.

172  : void
173  {
174  if (!$this->db->tableColumnExists('notification_osd', 'identification')) {
175  $this->db->addTableColumn('notification_osd', 'identification', [
176  'type' => 'text',
177  'length' => 255,
178  'notnull' => true,
179  'default' => ''
180  ]);
181  }
182 
183  $this->db->manipulate('TRUNCATE TABLE notification_osd');
184  }

◆ step_11()

ilNotificationUpdateSteps::step_11 ( )

Definition at line 186 of file ilNotificationUpdateSteps.php.

186  : void
187  {
188  $this->db->manipulateF(
189  'DELETE FROM settings WHERE module = %s AND keyword = %s',
190  ['text', 'text'],
191  ['notifications', 'enable_mail']
192  );
193  $this->db->insert('settings', [
194  'module' => ['text', 'notifications'],
195  'keyword' => ['text', 'enable_mail'],
196  'value' => ['text', '1']
197  ]);
198  }

◆ 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',
41  ['text', 'text'],
42  ['notifications', 'enable_mail']
43  );
44  $this->db->manipulateF(
45  'UPDATE settings SET keyword = %s WHERE module = %s AND keyword = %s',
46  ['text', 'text', 'text'],
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',
51  ['text', 'text', 'text', 'text'],
52  ['notifications', 'play_sound', 'chatroom', 'play_invitation_sound']
53  );
54  $this->db->manipulateF(
55  'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
56  ['text', 'text'],
57  ['play_sound', 'chat_play_invitation_sound']
58  );
59  }

◆ step_3()

ilNotificationUpdateSteps::step_3 ( )

Definition at line 61 of file ilNotificationUpdateSteps.php.

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

◆ step_4()

ilNotificationUpdateSteps::step_4 ( )

Definition at line 74 of file ilNotificationUpdateSteps.php.

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

◆ step_5()

ilNotificationUpdateSteps::step_5 ( )

Definition at line 99 of file ilNotificationUpdateSteps.php.

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

◆ step_6()

ilNotificationUpdateSteps::step_6 ( )

Definition at line 124 of file ilNotificationUpdateSteps.php.

124  : void
125  {
126  $this->db->insert('settings', [
127  'module' => ['text', 'notifications'],
128  'keyword' => ['text', 'osd_vanish'],
129  'value' => ['integer', 5]
130  ]);
131  $this->db->insert('settings', [
132  'module' => ['text', 'notifications'],
133  'keyword' => ['text', 'osd_delay'],
134  'value' => ['integer', 500]
135  ]);
136  }

◆ step_7()

ilNotificationUpdateSteps::step_7 ( )

Definition at line 138 of file ilNotificationUpdateSteps.php.

138  : void
139  {
140  $this->db->insert('settings', [
141  'module' => ['text', 'notifications'],
142  'keyword' => ['text', 'enable_mail'],
143  'value' => ['text', '1']
144  ]);
145  }

◆ step_8()

ilNotificationUpdateSteps::step_8 ( )

Definition at line 147 of file ilNotificationUpdateSteps.php.

147  : void
148  {
149  $this->db->addIndex('notification_osd', ['usr_id', 'type', 'time_added'], 'i1');
150  }

◆ step_9()

ilNotificationUpdateSteps::step_9 ( )

Definition at line 152 of file ilNotificationUpdateSteps.php.

152  : void
153  {
154  $this->db->manipulateF(
155  "UPDATE settings SET value = CONCAT(value , '000') WHERE keyword = %s",
156  ['text'],
157  ['osd_interval']
158  );
159  $this->db->manipulateF(
160  "UPDATE settings SET value = CONCAT(value , '000') WHERE keyword = %s",
161  ['text'],
162  ['osd_vanish']
163  );
164  $this->db->manipulateF(
165  'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
166  ['text', 'text'],
167  ['osd_play_sound', 'play_sound']
168  );
169 
170  }

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: