mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
[ticket/8920] Revert update_module_auth() on revert_data()
PHPBB3-8920
This commit is contained in:
parent
e9e199bc37
commit
aa01ee1bbc
1 changed files with 21 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue