mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-09 00:55:23 +02:00
correct mode is send_statistics, else installs will differ from updates.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10068 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5e2e08b05d
commit
3f22f755a3
@ -20,7 +20,7 @@ class acp_send_statistics_info
|
|||||||
'title' => 'ACP_SEND_STATISTICS',
|
'title' => 'ACP_SEND_STATISTICS',
|
||||||
'version' => '1.0.0',
|
'version' => '1.0.0',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'questionnaire' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
|
'send_statistics' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1181,11 +1181,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = ''
|
AND module_mode = ''
|
||||||
AND module_basename = ''";
|
AND module_basename = ''";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
$category_id = (int) $db->sql_fetchfield('module_id');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if ($category_id)
|
||||||
{
|
{
|
||||||
$category_id = (int) $row['module_id'];
|
|
||||||
|
|
||||||
// Check if we actually need to add the module or if it is already added. ;)
|
// Check if we actually need to add the module or if it is already added. ;)
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . MODULES_TABLE . "
|
FROM ' . MODULES_TABLE . "
|
||||||
@ -1194,11 +1194,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = 'warnings'
|
AND module_mode = 'warnings'
|
||||||
AND module_auth = 'acl_a_user'
|
AND module_auth = 'acl_a_user'
|
||||||
AND parent_id = {$category_id}";
|
AND parent_id = {$category_id}";
|
||||||
$result2 = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row2 = $db->sql_fetchrow($result2);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result2);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!$row2)
|
if (!$row)
|
||||||
{
|
{
|
||||||
$module_data = array(
|
$module_data = array(
|
||||||
'module_basename' => 'users',
|
'module_basename' => 'users',
|
||||||
@ -1214,8 +1214,6 @@ function change_database_data(&$no_updates, $version)
|
|||||||
$_module->update_module_data($module_data, true);
|
$_module->update_module_data($module_data, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
|
|
||||||
// Also install the "PM Reports" module
|
// Also install the "PM Reports" module
|
||||||
$sql = 'SELECT module_id
|
$sql = 'SELECT module_id
|
||||||
@ -1225,15 +1223,15 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = ''
|
AND module_mode = ''
|
||||||
AND module_basename = ''";
|
AND module_basename = ''";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
$category_id = (int) $db->sql_fetchfield('module_id');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if ($category_id)
|
||||||
{
|
{
|
||||||
$category_id = (int) $row['module_id'];
|
|
||||||
|
|
||||||
$modes = array(
|
$modes = array(
|
||||||
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report'),
|
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report'),
|
||||||
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report'),
|
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report'),
|
||||||
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report'),
|
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report'),
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($modes as $mode => $data)
|
foreach ($modes as $mode => $data)
|
||||||
@ -1245,11 +1243,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_langname = '{$data['title']}'
|
AND module_langname = '{$data['title']}'
|
||||||
AND module_mode = '$mode'
|
AND module_mode = '$mode'
|
||||||
AND parent_id = {$category_id}";
|
AND parent_id = {$category_id}";
|
||||||
$result2 = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row2 = $db->sql_fetchrow($result2);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result2);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!$row2)
|
if (!$row)
|
||||||
{
|
{
|
||||||
$module_data = array(
|
$module_data = array(
|
||||||
'module_basename' => 'pm_reports',
|
'module_basename' => 'pm_reports',
|
||||||
@ -1266,7 +1264,6 @@ function change_database_data(&$no_updates, $version)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Also install the "Copy forum permissions" module
|
// Also install the "Copy forum permissions" module
|
||||||
$sql = 'SELECT module_id
|
$sql = 'SELECT module_id
|
||||||
@ -1276,11 +1273,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = ''
|
AND module_mode = ''
|
||||||
AND module_basename = ''";
|
AND module_basename = ''";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
$category_id = (int) $db->sql_fetchfield('module_id');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if ($category_id)
|
||||||
{
|
{
|
||||||
$category_id = (int) $row['module_id'];
|
|
||||||
|
|
||||||
// Check if we actually need to add the feed module or if it is already added. ;)
|
// Check if we actually need to add the feed module or if it is already added. ;)
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . MODULES_TABLE . "
|
FROM ' . MODULES_TABLE . "
|
||||||
@ -1289,11 +1286,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = 'setting_forum_copy'
|
AND module_mode = 'setting_forum_copy'
|
||||||
AND module_auth = 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth'
|
AND module_auth = 'acl_a_fauth && acl_a_authusers && acl_a_authgroups && acl_a_mauth'
|
||||||
AND parent_id = {$category_id}";
|
AND parent_id = {$category_id}";
|
||||||
$result2 = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row2 = $db->sql_fetchrow($result2);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result2);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!$row2)
|
if (!$row)
|
||||||
{
|
{
|
||||||
$module_data = array(
|
$module_data = array(
|
||||||
'module_basename' => 'permissions',
|
'module_basename' => 'permissions',
|
||||||
@ -1309,7 +1306,6 @@ function change_database_data(&$no_updates, $version)
|
|||||||
$_module->update_module_data($module_data, true);
|
$_module->update_module_data($module_data, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
// Also install the "Send statistics" module
|
// Also install the "Send statistics" module
|
||||||
$sql = 'SELECT module_id
|
$sql = 'SELECT module_id
|
||||||
@ -1319,11 +1315,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = ''
|
AND module_mode = ''
|
||||||
AND module_basename = ''";
|
AND module_basename = ''";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
$category_id = (int) $db->sql_fetchfield('module_id');
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
if ($category_id)
|
||||||
{
|
{
|
||||||
$category_id = (int) $row['module_id'];
|
|
||||||
|
|
||||||
// Check if we need to add the module or if it is already there. ;)
|
// Check if we need to add the module or if it is already there. ;)
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . MODULES_TABLE . "
|
FROM ' . MODULES_TABLE . "
|
||||||
@ -1332,11 +1328,11 @@ function change_database_data(&$no_updates, $version)
|
|||||||
AND module_mode = 'send_statistics'
|
AND module_mode = 'send_statistics'
|
||||||
AND module_auth = 'acl_a_server'
|
AND module_auth = 'acl_a_server'
|
||||||
AND parent_id = {$category_id}";
|
AND parent_id = {$category_id}";
|
||||||
$result2 = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$row2 = $db->sql_fetchrow($result2);
|
$row = $db->sql_fetchrow($result);
|
||||||
$db->sql_freeresult($result2);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
if (!$row2)
|
if (!$row)
|
||||||
{
|
{
|
||||||
$module_data = array(
|
$module_data = array(
|
||||||
'module_basename' => 'send_statistics',
|
'module_basename' => 'send_statistics',
|
||||||
@ -1352,7 +1348,6 @@ function change_database_data(&$no_updates, $version)
|
|||||||
$_module->update_module_data($module_data, true);
|
$_module->update_module_data($module_data, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
$_module->remove_cache_file();
|
$_module->remove_cache_file();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user