aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb
diff options
context:
space:
mode:
authorZoddo <zoddo.ino@gmail.com>2015-09-13 14:06:10 +0200
committerZoddo <zoddo.ino@gmail.com>2015-09-13 14:06:10 +0200
commitaa01ee1bbccd415591771635179991c9f1fc8379 (patch)
treeabdff4d47f2ba35caae7bb4cf298529a9dcbdc1e /phpBB/phpbb
parente9e199bc378ee09f05d3497be57441b79cbd17d9 (diff)
downloadforums-aa01ee1bbccd415591771635179991c9f1fc8379.tar
forums-aa01ee1bbccd415591771635179991c9f1fc8379.tar.gz
forums-aa01ee1bbccd415591771635179991c9f1fc8379.tar.bz2
forums-aa01ee1bbccd415591771635179991c9f1fc8379.tar.xz
forums-aa01ee1bbccd415591771635179991c9f1fc8379.zip
[ticket/8920] Revert update_module_auth() on revert_data()
PHPBB3-8920
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r--phpBB/phpbb/db/migration/data/v31x/m_pm_report.php21
1 files changed, 21 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
index 3646d64cd7..9b5710c639 100644
--- a/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
+++ b/phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
@@ -31,6 +31,17 @@ class m_pm_report extends \phpbb\db\migration\migration
);
}
+ 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 . "
@@ -40,4 +51,14 @@ class m_pm_report extends \phpbb\db\migration\migration
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);
+ }
}