mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11465
This commit is contained in:
@@ -55,6 +55,7 @@ class acp_board
|
||||
'site_desc' => array('lang' => 'SITE_DESC', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => false),
|
||||
'site_home_url' => array('lang' => 'SITE_HOME_URL', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
||||
'site_home_text' => array('lang' => 'SITE_HOME_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
||||
'board_index_text' => array('lang' => 'BOARD_INDEX_TEXT', 'validate' => 'string', 'type' => 'text:40:255', 'explain' => true),
|
||||
'board_disable' => array('lang' => 'DISABLE_BOARD', 'validate' => 'bool', 'type' => 'custom', 'method' => 'board_disable', 'explain' => true),
|
||||
'board_disable_msg' => false,
|
||||
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
||||
@@ -397,6 +398,7 @@ class acp_board
|
||||
'vars' => array(
|
||||
'legend1' => 'ACP_SECURITY_SETTINGS',
|
||||
'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_password_reset' => array('lang' => 'ALLOW_PASSWORD_RESET', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
||||
'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true),
|
||||
'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
@@ -54,7 +54,7 @@ class acp_extensions
|
||||
// If they've specified an extension, let's load the metadata manager and validate it.
|
||||
if ($ext_name)
|
||||
{
|
||||
$md_manager = new phpbb_extension_metadata_manager($ext_name, $db, $phpbb_extension_manager, $phpbb_root_path, ".$phpEx", $template, $config);
|
||||
$md_manager = new phpbb_extension_metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -81,7 +81,7 @@ class acp_extensions
|
||||
case 'enable_pre':
|
||||
if (!$md_manager->validate_enable())
|
||||
{
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->enabled($ext_name))
|
||||
@@ -100,7 +100,7 @@ class acp_extensions
|
||||
case 'enable':
|
||||
if (!$md_manager->validate_enable())
|
||||
{
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang['EXTENSION_NOT_AVAILABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
try
|
||||
|
@@ -148,57 +148,58 @@ class acp_groups
|
||||
'action' => $action))
|
||||
);
|
||||
}
|
||||
|
||||
break;
|
||||
case 'set_default_on_all':
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
|
||||
$start = 0;
|
||||
|
||||
do
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USER_GROUP_TABLE . "
|
||||
WHERE group_id = $group_id
|
||||
ORDER BY user_id";
|
||||
$result = $db->sql_query_limit($sql, 200, $start);
|
||||
|
||||
$mark_ary = array();
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$mark_ary[] = $row['user_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
|
||||
|
||||
$start = (sizeof($mark_ary) < 200) ? 0 : $start + 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
$start = 0;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
while ($start);
|
||||
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'mark' => $mark_ary,
|
||||
'g' => $group_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action))
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'set_default_on_all':
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
|
||||
|
||||
$start = 0;
|
||||
|
||||
do
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USER_GROUP_TABLE . "
|
||||
WHERE group_id = $group_id
|
||||
ORDER BY user_id";
|
||||
$result = $db->sql_query_limit($sql, 200, $start);
|
||||
|
||||
$mark_ary = array();
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
{
|
||||
$mark_ary[] = $row['user_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
|
||||
|
||||
$start = (sizeof($mark_ary) < 200) ? 0 : $start + 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
$start = 0;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
while ($start);
|
||||
|
||||
trigger_error($user->lang['GROUP_DEFS_UPDATED'] . adm_back_link($this->u_action . '&action=list&g=' . $group_id));
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
'mark' => $mark_ary,
|
||||
'g' => $group_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action))
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'deleteusers':
|
||||
if (empty($mark_ary))
|
||||
{
|
||||
|
@@ -115,7 +115,7 @@ class acp_inactive
|
||||
{
|
||||
$messenger->template('admin_welcome_activated', $row['user_lang']);
|
||||
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
@@ -203,8 +203,7 @@ class acp_inactive
|
||||
{
|
||||
$messenger->template('user_remind_inactive', $row['user_lang']);
|
||||
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
$messenger->set_addresses($row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
|
@@ -331,7 +331,7 @@ class acp_prune
|
||||
$s_find_active_time .= '<option value="' . $key . '">' . $value . '</option>';
|
||||
}
|
||||
|
||||
$s_group_list = '';
|
||||
$s_group_list = '<option value="0"></option>';
|
||||
$sql = 'SELECT group_id, group_name
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_type <> ' . GROUP_SPECIAL . '
|
||||
@@ -340,7 +340,7 @@ class acp_prune
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$s_group_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</select>';
|
||||
$s_group_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -491,11 +491,12 @@ class acp_prune
|
||||
|
||||
if ($group_id)
|
||||
{
|
||||
$sql = 'SELECT user_id
|
||||
FROM ' . USER_GROUP_TABLE . '
|
||||
WHERE group_id = ' . (int) $group_id . '
|
||||
AND user_pending = 0
|
||||
AND ' . $db->sql_in_set('user_id', $user_ids, false, true);
|
||||
$sql = 'SELECT u.user_id, u.username
|
||||
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
|
||||
WHERE ug.group_id = ' . (int) $group_id . '
|
||||
AND ug.user_pending = 0
|
||||
AND ' . $db->sql_in_set('ug.user_id', $user_ids, false, true) . '
|
||||
AND u.user_id = ug.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// we're performing an intersection operation, so all the relevant users
|
||||
@@ -504,24 +505,19 @@ class acp_prune
|
||||
$user_ids = $usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = $row['poster_id'];
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// only get usernames if they are needed (not part of some later query)
|
||||
if (!$posts_on_queue)
|
||||
{
|
||||
// this is an additional query aginst the users table
|
||||
user_get_id_name($user_ids, $usernames);
|
||||
}
|
||||
}
|
||||
|
||||
if ($posts_on_queue)
|
||||
{
|
||||
$sql = 'SELECT poster_id, COUNT(post_id) AS queue_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('poster_id', $user_ids, false, true) . '
|
||||
GROUP BY poster_id
|
||||
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . $db->sql_in_set('p.poster_id', $user_ids, false, true) . '
|
||||
AND u.user_id = p.poster_id
|
||||
GROUP BY p.poster_id
|
||||
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
|
||||
$result = $db->sql_query($result);
|
||||
|
||||
@@ -529,12 +525,10 @@ class acp_prune
|
||||
$user_ids = $usernames = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_ids[] = $row['poster_id'];
|
||||
$user_ids[] = $row['user_id'];
|
||||
$usernames[$row['user_id']] = $row['username'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// do an additional query to get the correct set of usernames
|
||||
user_get_id_name($user_ids, $usernames);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -347,7 +347,7 @@ class acp_users
|
||||
|
||||
$messenger->template($email_template, $user_row['user_lang']);
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
$messenger->set_addresses($user_row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
@@ -402,7 +402,7 @@ class acp_users
|
||||
|
||||
$messenger->template('admin_welcome_activated', $user_row['user_lang']);
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
$messenger->set_addresses($user_row);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
|
Reference in New Issue
Block a user