From 5a91399dac9eed844c79c10324034db531432589 Mon Sep 17 00:00:00 2001 From: n-aleha Date: Wed, 16 Apr 2014 13:14:36 +0300 Subject: [PATCH 1/2] [ticket/12186] Move PM reports below post reports while installing In mcp, move PM reports below post reports while installing. PHPBB3-12186 --- phpBB/includes/mcp/info/mcp_pm_reports.php | 2 +- phpBB/install/install_install.php | 39 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/mcp/info/mcp_pm_reports.php b/phpBB/includes/mcp/info/mcp_pm_reports.php index 103f560597..84f15b7107 100644 --- a/phpBB/includes/mcp/info/mcp_pm_reports.php +++ b/phpBB/includes/mcp/info/mcp_pm_reports.php @@ -20,7 +20,7 @@ class mcp_pm_reports_info 'title' => 'MCP_PM_REPORTS', 'version' => '1.0.0', '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' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), 'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), 'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')), ), diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 0a100ae71b..78f3f00eda 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1624,6 +1624,45 @@ class install_install extends module $_module->move_module_by($row, 'move_up', 5); } + if ($module_class == 'mcp') + { + // Move pm report details module 3 down... + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_basename = 'pm_reports' + AND module_class = 'mcp' + AND module_mode = 'pm_report_details'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $_module->move_module_by($row, 'move_down', 3); + + // Move closed pm reports module 3 down... + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_basename = 'pm_reports' + AND module_class = 'mcp' + AND module_mode = 'pm_reports_closed'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $_module->move_module_by($row, 'move_down', 3); + + // Move open pm reports module 3 down... + $sql = 'SELECT * + FROM ' . MODULES_TABLE . " + WHERE module_basename = 'pm_reports' + AND module_class = 'mcp' + AND module_mode = 'pm_reports'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $_module->move_module_by($row, 'move_down', 3); + } + if ($module_class == 'ucp') { // Move attachment module 4 down... From ac8ce42a1297815c0991949ee8340fa682433cc1 Mon Sep 17 00:00:00 2001 From: n-aleha Date: Sun, 27 Apr 2014 22:44:41 +0300 Subject: [PATCH 2/2] [ticket/12186] Move PM reports below post reports while installing for ascraeus In mcp, move PM reports below post reports while installing. PHPBB3-12186 --- phpBB/install/install_install.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 858a133a3e..781765d89f 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -1654,7 +1654,7 @@ class install_install extends module // Move pm report details module 3 down... $sql = 'SELECT * FROM ' . MODULES_TABLE . " - WHERE module_basename = 'pm_reports' + WHERE module_basename = 'mcp_pm_reports' AND module_class = 'mcp' AND module_mode = 'pm_report_details'"; $result = $db->sql_query($sql); @@ -1666,7 +1666,7 @@ class install_install extends module // Move closed pm reports module 3 down... $sql = 'SELECT * FROM ' . MODULES_TABLE . " - WHERE module_basename = 'pm_reports' + WHERE module_basename = 'mcp_pm_reports' AND module_class = 'mcp' AND module_mode = 'pm_reports_closed'"; $result = $db->sql_query($sql); @@ -1678,7 +1678,7 @@ class install_install extends module // Move open pm reports module 3 down... $sql = 'SELECT * FROM ' . MODULES_TABLE . " - WHERE module_basename = 'pm_reports' + WHERE module_basename = 'mcp_pm_reports' AND module_class = 'mcp' AND module_mode = 'pm_reports'"; $result = $db->sql_query($sql);