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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

m_pm_report.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 1.38 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\v31x;
15   
16  class m_pm_report extends \phpbb\db\migration\migration
17  {
18      static public function depends_on()
19      {
20          return array('\phpbb\db\migration\data\v31x\v316rc1');
21      }
22   
23      public function update_data()
24      {
25          return array(
26              array('permission.add', array('m_pm_report', true, 'm_report')),
27              array('custom', array(
28                      array($this, 'update_module_auth'),
29                  ),
30              ),
31          );
32      }
33   
34      public function revert_data()
35      {
36          return array(
37              array('permission.remove', array('m_pm_report')),
38              array('custom', array(
39                      array($this, 'revert_module_auth'),
40                  ),
41              ),
42          );
43      }
44   
45      public function update_module_auth()
46      {
47          $sql = 'UPDATE ' . MODULES_TABLE . "
48              SET module_auth = 'acl_m_pm_report'
49              WHERE module_class = 'mcp'
50                  AND module_basename = 'mcp_pm_reports'
51                  AND module_auth = 'aclf_m_report'";
52          $this->db->sql_query($sql);
53      }
54   
55      public function revert_module_auth()
56      {
57          $sql = 'UPDATE ' . MODULES_TABLE . "
58              SET module_auth = 'aclf_m_report'
59              WHERE module_class = 'mcp'
60                  AND module_basename = 'mcp_pm_reports'
61                  AND module_auth = 'acl_m_pm_report'";
62          $this->db->sql_query($sql);
63      }
64  }
65