[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/db/migration/data/v31x/ -> m_pm_report.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * 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  }


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1