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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

release_3_0_3_rc1.php

Zuletzt modifiziert: 09.10.2024, 12:57 - Dateigröße: 2.42 KiB


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  class release_3_0_3_rc1 extends \phpbb\db\migration\migration
17  {
18      public function effectively_installed()
19      {
20          return phpbb_version_compare($this->config['version'], '3.0.3-RC1', '>=');
21      }
22   
23      static public function depends_on()
24      {
25          return array('\phpbb\db\migration\data\v30x\release_3_0_2');
26      }
27   
28      public function update_schema()
29      {
30          return array(
31              'add_columns' => array(
32                  $this->table_prefix . 'styles_template' => array(
33                      'template_inherits_id' => array('UINT:4', 0),
34                      'template_inherit_path' => array('VCHAR', ''),
35                  ),
36                  $this->table_prefix . 'groups' => array(
37                      'group_max_recipients' => array('UINT', 0),
38                  ),
39              ),
40          );
41      }
42   
43      public function revert_schema()
44      {
45          return array(
46              'drop_columns' => array(
47                  $this->table_prefix . 'styles_template' => array(
48                      'template_inherits_id',
49                      'template_inherit_path',
50                  ),
51                  $this->table_prefix . 'groups' => array(
52                      'group_max_recipients',
53                  ),
54              ),
55          );
56      }
57   
58      public function update_data()
59      {
60          return array(
61              array('config.add', array('enable_queue_trigger', '0')),
62              array('config.add', array('queue_trigger_posts', '3')),
63              array('config.add', array('pm_max_recipients', '0')),
64              array('custom', array(array(&$this, 'set_group_default_max_recipients'))),
65              array('config.add', array('dbms_version', $this->db->sql_server_info(true))),
66              array('permission.add', array('u_masspm_group', true, 'u_masspm')),
67              array('custom', array(array(&$this, 'correct_acp_email_permissions'))),
68   
69              array('config.update', array('version', '3.0.3-RC1')),
70          );
71      }
72   
73      public function correct_acp_email_permissions()
74      {
75          $sql = 'UPDATE ' . $this->table_prefix . 'modules
76              SET module_auth = \'acl_a_email && cfg_email_enable\'
77              WHERE module_class = \'acp\'
78                  AND module_basename = \'email\'';
79          $this->sql_query($sql);
80      }
81   
82      public function set_group_default_max_recipients()
83      {
84          // Set maximum number of recipients for the registered users, bots, guests group
85          $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5
86              WHERE ' . $this->db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));
87          $this->sql_query($sql);
88      }
89  }
90