19 declare(strict_types=1);
39 $this->db->manipulateF(
40 'DELETE FROM settings WHERE module = %s AND keyword = %s',
42 [
'notifications',
'enable_mail']
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']
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']
54 $this->db->manipulateF(
55 'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
57 [
'play_sound',
'chat_play_invitation_sound']
63 $this->db->manipulateF(
'DELETE FROM notification_usercfg WHERE module = %s', [
'text'], [
'osd_main']);
64 ilNotificationSetupHelper::registerType(
66 'buddysystem_request',
67 'buddysystem_request',
68 'buddysystem_request_desc',
76 ilNotificationSetupHelper::registerType(
85 'notification_usercfg',
87 'usr_id' => [
'integer', -1],
88 'module' => [
'text',
'who_is_online'],
89 'channel' => [
'text',
'osd']
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%']
101 ilNotificationSetupHelper::registerType(
105 'badge_received_desc',
110 'notification_usercfg',
112 'usr_id' => [
'integer', -1],
113 'module' => [
'text',
'badge_received'],
114 'channel' => [
'text',
'osd']
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%']
126 $this->db->insert(
'settings', [
127 'module' => [
'text',
'notifications'],
128 'keyword' => [
'text',
'osd_vanish'],
129 'value' => [
'integer', 5]
131 $this->db->insert(
'settings', [
132 'module' => [
'text',
'notifications'],
133 'keyword' => [
'text',
'osd_delay'],
134 'value' => [
'integer', 500]
140 $this->db->insert(
'settings', [
141 'module' => [
'text',
'notifications'],
142 'keyword' => [
'text',
'enable_mail'],
143 'value' => [
'text',
'1']
149 $this->db->addIndex(
'notification_osd', [
'usr_id',
'type',
'time_added'],
'i1');
154 $this->db->manipulateF(
155 "UPDATE settings SET value = CONCAT(value , '000') WHERE keyword = %s",
159 $this->db->manipulateF(
160 "UPDATE settings SET value = CONCAT(value , '000') WHERE keyword = %s",
164 $this->db->manipulateF(
165 'UPDATE usr_pref SET keyword = %s WHERE keyword = %s',
167 [
'osd_play_sound',
'play_sound']
174 if (!$this->db->tableColumnExists(
'notification_osd',
'identification')) {
175 $this->db->addTableColumn(
'notification_osd',
'identification', [
183 $this->db->manipulate(
'TRUNCATE TABLE notification_osd');
188 $this->db->manipulateF(
189 'DELETE FROM settings WHERE module = %s AND keyword = %s',
191 [
'notifications',
'enable_mail']
193 $this->db->insert(
'settings', [
194 'module' => [
'text',
'notifications'],
195 'keyword' => [
'text',
'enable_mail'],
196 'value' => [
'text',
'1']
prepare(ilDBInterface $db)