diff options
| author | Marc Alexander <admin@m-a-styles.de> | 2015-10-11 10:48:53 +0200 |
|---|---|---|
| committer | Marc Alexander <admin@m-a-styles.de> | 2015-10-11 10:48:53 +0200 |
| commit | 8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d (patch) | |
| tree | 509de1d16752d04171d7fe275a2788976c509c46 /phpBB/phpbb/db | |
| parent | f6f796770a0964589669d97a1c4d79569b900de8 (diff) | |
| parent | f6c8338358e5216a62c37bc8ccf252d0e5c6fe0f (diff) | |
| download | forums-8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d.tar forums-8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d.tar.gz forums-8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d.tar.bz2 forums-8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d.tar.xz forums-8c3fdfe4e12a2ea8c485f30a223fe344cb04ef9d.zip | |
Merge branch '3.1.x'
Diffstat (limited to 'phpBB/phpbb/db')
| -rw-r--r-- | phpBB/phpbb/db/migration/data/v31x/m_pm_report.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php new file mode 100644 index 0000000000..9b5710c639 --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php @@ -0,0 +1,64 @@ +<?php +/** +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\db\migration\data\v31x; + +class m_pm_report extends \phpbb\db\migration\migration +{ + static public function depends_on() + { + return array('\phpbb\db\migration\data\v31x\v316rc1'); + } + + public function update_data() + { + return array( + array('permission.add', array('m_pm_report', true, 'm_report')), + array('custom', array( + array($this, 'update_module_auth'), + ), + ), + ); + } + + public function revert_data() + { + return array( + array('permission.remove', array('m_pm_report')), + array('custom', array( + array($this, 'revert_module_auth'), + ), + ), + ); + } + + public function update_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'acl_m_pm_report' + WHERE module_class = 'mcp' + AND module_basename = 'mcp_pm_reports' + AND module_auth = 'aclf_m_report'"; + $this->db->sql_query($sql); + } + + public function revert_module_auth() + { + $sql = 'UPDATE ' . MODULES_TABLE . " + SET module_auth = 'aclf_m_report' + WHERE module_class = 'mcp' + AND module_basename = 'mcp_pm_reports' + AND module_auth = 'acl_m_pm_report'"; + $this->db->sql_query($sql); + } +} |
