Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
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 |
release_3_0_12_rc1.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\v30x;
15
16 /** @todo DROP LOGIN_ATTEMPT_TABLE.attempt_id in 3.0.12-RC1 **/
17
18 class release_3_0_12_rc1 extends \phpbb\db\migration\migration
19 {
20 public function effectively_installed()
21 {
22 return phpbb_version_compare($this->config['version'], '3.0.12-RC1', '>=');
23 }
24
25 static public function depends_on()
26 {
27 return array('\phpbb\db\migration\data\v30x\release_3_0_11');
28 }
29
30 public function update_data()
31 {
32 return array(
33 array('custom', array(array(&$this, 'update_module_auth'))),
34 array('custom', array(array(&$this, 'disable_bots_from_receiving_pms'))),
35
36 array('config.update', array('version', '3.0.12-RC1')),
37 );
38 }
39
40 public function disable_bots_from_receiving_pms()
41 {
42 // Disable receiving pms for bots
43 $sql = 'SELECT user_id
44 FROM ' . BOTS_TABLE;
45 $result = $this->db->sql_query($sql);
46
47 $bot_user_ids = array();
48 while ($row = $this->db->sql_fetchrow($result))
49 {
50 $bot_user_ids[] = (int) $row['user_id'];
51 }
52 $this->db->sql_freeresult($result);
53
54 if (!empty($bot_user_ids))
55 {
56 $sql = 'UPDATE ' . USERS_TABLE . '
57 SET user_allow_pm = 0
58 WHERE ' . $this->db->sql_in_set('user_id', $bot_user_ids);
59 $this->sql_query($sql);
60 }
61 }
62
63 public function update_module_auth()
64 {
65 $sql = 'UPDATE ' . MODULES_TABLE . '
66 SET module_auth = \'acl_u_sig\'
67 WHERE module_class = \'ucp\'
68 AND module_basename = \'profile\'
69 AND module_mode = \'signature\'';
70 $this->sql_query($sql);
71 }
72 }
73