mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 12:28:52 +00:00
Merge branch '3.1.x'
This commit is contained in:
commit
8c3fdfe4e1
6 changed files with 77 additions and 10 deletions
|
@ -19,9 +19,9 @@ class mcp_pm_reports_info
|
||||||
'filename' => 'mcp_pm_reports',
|
'filename' => 'mcp_pm_reports',
|
||||||
'title' => 'MCP_PM_REPORTS',
|
'title' => 'MCP_PM_REPORTS',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||||
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||||
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,7 +274,7 @@ function mcp_front_view($id, $mode, $action)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Latest 5 reported PMs
|
// Latest 5 reported PMs
|
||||||
if ($module->loaded('pm_reports') && $auth->acl_getf_global('m_report'))
|
if ($module->loaded('pm_reports') && $auth->acl_get('m_pm_report'))
|
||||||
{
|
{
|
||||||
$template->assign_var('S_SHOW_PM_REPORTS', true);
|
$template->assign_var('S_SHOW_PM_REPORTS', true);
|
||||||
$user->add_lang(array('ucp'));
|
$user->add_lang(array('ucp'));
|
||||||
|
|
|
@ -358,6 +358,7 @@ INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_soft
|
||||||
|
|
||||||
# -- Global moderator auth option (not a local option)
|
# -- Global moderator auth option (not a local option)
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1);
|
||||||
|
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_pm_report', 0, 1);
|
||||||
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1);
|
INSERT INTO phpbb_acl_options (auth_option, is_local, is_global) VALUES ('m_warn', 0, 1);
|
||||||
|
|
||||||
# -- Admin related auth options
|
# -- Admin related auth options
|
||||||
|
@ -545,7 +546,7 @@ INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 11, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option NOT IN ('m_ban', 'm_chgposter');
|
||||||
|
|
||||||
# Simple Moderator (m_)
|
# Simple Moderator (m_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 12, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_delete', 'm_softdelete', 'm_edit', 'm_info', 'm_report', 'm_pm_report');
|
||||||
|
|
||||||
# Queue Moderator (m_)
|
# Queue Moderator (m_)
|
||||||
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
|
INSERT INTO phpbb_acl_roles_data (role_id, auth_option_id, auth_setting) SELECT 13, auth_option_id, 1 FROM phpbb_acl_options WHERE auth_option LIKE 'm_%' AND auth_option IN ('m_', 'm_approve', 'm_edit');
|
||||||
|
|
|
@ -158,6 +158,7 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'ACL_M_INFO' => 'Can view post details',
|
'ACL_M_INFO' => 'Can view post details',
|
||||||
'ACL_M_WARN' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
|
'ACL_M_WARN' => 'Can issue warnings<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
|
||||||
|
'ACL_M_PM_REPORT' => 'Can close and delete reports of private messages<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
|
||||||
'ACL_M_BAN' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
|
'ACL_M_BAN' => 'Can manage bans<br /><em>This setting is only assigned globally. It is not forum based.</em>', // This moderator setting is only global (and not local)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
64
phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
Normal file
64
phpBB/phpbb/db/migration/data/v31x/m_pm_report.php
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -309,6 +309,7 @@ class permissions
|
||||||
'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'),
|
'm_merge' => array('lang' => 'ACL_M_MERGE', 'cat' => 'topic_actions'),
|
||||||
|
|
||||||
'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
|
'm_warn' => array('lang' => 'ACL_M_WARN', 'cat' => 'misc'),
|
||||||
|
'm_pm_report' => array('lang' => 'ACL_M_PM_REPORT', 'cat' => 'misc'),
|
||||||
'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
|
'm_ban' => array('lang' => 'ACL_M_BAN', 'cat' => 'misc'),
|
||||||
|
|
||||||
// Admin Permissions
|
// Admin Permissions
|
||||||
|
|
Loading…
Add table
Reference in a new issue