Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
notifications_board.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\db\migration\data\v320;
15
16 class notifications_board extends \phpbb\db\migration\migration
17 {
18 static public function depends_on()
19 {
20 return array(
21 '\phpbb\db\migration\data\v320\dev',
22 );
23 }
24
25 public function update_data()
26 {
27 return array(
28 array('config.add', array('allow_board_notifications', 1)),
29 array('custom', array(array($this, 'update_user_subscriptions'))),
30 array('custom', array(array($this, 'update_module'))),
31 );
32 }
33
34 public function update_module()
35 {
36 $sql = 'UPDATE ' . MODULES_TABLE . "
37 SET module_auth = 'cfg_allow_board_notifications'
38 WHERE module_basename = 'ucp_notifications'
39 AND module_mode = 'notification_list'";
40 $this->sql_query($sql);
41 }
42
43 public function update_user_subscriptions()
44 {
45 $sql = 'UPDATE ' . USER_NOTIFICATIONS_TABLE . "
46 SET method = 'notification.method.board'
47 WHERE method = ''";
48 $this->sql_query($sql);
49 }
50
51 public function revert_data()
52 {
53 return array(
54 array('custom', array(array($this, 'revert_user_subscriptions'))),
55 array('custom', array(array($this, 'revert_module'))),
56 );
57 }
58
59 public function revert_user_subscriptions()
60 {
61 $sql = 'UPDATE ' . USER_NOTIFICATIONS_TABLE . "
62 SET method = ''
63 WHERE method = 'notification.method.board'";
64 $this->sql_query($sql);
65 }
66
67 public function revert_module()
68 {
69 $sql = 'UPDATE ' . MODULES_TABLE . "
70 SET auth = ''
71 WHERE module_basename = 'ucp_notifications'
72 AND module_mode = 'notification_list'";
73 $this->sql_query($sql);
74 }
75 }
76