aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/download.php8
-rw-r--r--phpBB/includes/acp/acp_email.php15
-rw-r--r--phpBB/includes/acp/acp_groups.php95
-rw-r--r--phpBB/includes/acp/acp_language.php11
-rw-r--r--phpBB/includes/acp/acp_modules.php10
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_convert.php4
-rw-r--r--phpBB/includes/functions_display.php28
-rw-r--r--phpBB/includes/functions_messenger.php2
-rw-r--r--phpBB/includes/functions_user.php12
-rw-r--r--phpBB/includes/mcp/mcp_forum.php12
-rw-r--r--phpBB/includes/mcp/mcp_queue.php4
-rw-r--r--phpBB/includes/ucp/ucp_groups.php114
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php2
-rw-r--r--phpBB/index.php2
-rw-r--r--phpBB/language/en/acp/attachments.php2
-rw-r--r--phpBB/language/en/acp/common.php3
-rw-r--r--phpBB/language/en/acp/email.php2
-rw-r--r--phpBB/language/en/acp/groups.php2
-rw-r--r--phpBB/language/en/common.php5
-rw-r--r--phpBB/language/en/groups.php2
-rw-r--r--phpBB/language/en/mcp.php2
-rw-r--r--phpBB/language/en/posting.php2
-rw-r--r--phpBB/mcp.php13
-rw-r--r--phpBB/memberlist.php20
-rw-r--r--phpBB/styles/subSilver/template/mcp_header.html25
-rw-r--r--phpBB/viewtopic.php10
27 files changed, 257 insertions, 152 deletions
diff --git a/phpBB/download.php b/phpBB/download.php
index cec44eaf1c..16b4bfa76e 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -270,9 +270,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
*/
function header_filename($file)
{
- // There be dragons here...
- // IE and Safari follows no RFC.
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false)
+ $user_agent = $_SERVER['HTTP_USER_AGENT'];
+
+ // There be dragons here.
+ // Not many follows the RFC...
+ if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
{
return "filename=" . rawurlencode($file);
}
diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php
index 57d03ff67e..3fbbe6472f 100644
--- a/phpBB/includes/acp/acp_email.php
+++ b/phpBB/includes/acp/acp_email.php
@@ -51,7 +51,7 @@ class acp_email
$error[] = $user->lang['NO_EMAIL_MESSAGE'];
}
- if (!sizeof($error))
+ if (!sizeof($error))
{
if ($usernames)
{
@@ -208,16 +208,21 @@ class acp_email
}
}
- // Exclude bots...
+ // Exclude bots and guests...
$sql = 'SELECT group_id
FROM ' . GROUPS_TABLE . "
- WHERE group_name = 'BOTS'";
+ WHERE group_name IN ('BOTS', 'GUESTS')";
$result = $db->sql_query($sql);
- $bot_group_id = (int) $db->sql_fetchfield('group_id');
+
+ $exclude = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $exclude[] = $row['group_id'];
+ }
$db->sql_freeresult($result);
$select_list = '<option value="0"' . ((!$group_id) ? ' selected="selected"' : '') . '>' . $user->lang['ALL_USERS'] . '</option>';
- $select_list .= group_select_options($group_id, array($bot_group_id));
+ $select_list .= group_select_options($group_id, $exclude);
$s_priority_options = '<option value="' . MAIL_LOW_PRIORITY . '">' . $user->lang['MAIL_LOW_PRIORITY'] . '</option>';
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php
index 7147431259..2645ac4ce3 100644
--- a/phpBB/includes/acp/acp_groups.php
+++ b/phpBB/includes/acp/acp_groups.php
@@ -272,16 +272,13 @@ class acp_groups
'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0,
'legend' => isset($_REQUEST['group_legend']) ? 1 : 0,
'message_limit' => request_var('group_message_limit', 0),
+ 'founder_manage' => 0,
);
if ($user->data['user_type'] == USER_FOUNDER)
{
$submit_ary['founder_manage'] = isset($_REQUEST['group_founder_manage']) ? 1 : 0;
}
- else
- {
- $submit_ary['founder_manage'] = 0;
- }
if (!empty($_FILES['uploadfile']['tmp_name']) || $data['uploadurl'] || $data['remotelink'])
{
@@ -318,6 +315,11 @@ class acp_groups
$submit_ary['avatar'] = $category . '/' . $avatar_select;
}
}
+ else if ($delete)
+ {
+ $submit_ary['avatar'] = '';
+ $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
+ }
else if ($data['width'] && $data['height'])
{
// Only update the dimensions?
@@ -346,11 +348,6 @@ class acp_groups
$submit_ary['avatar_height'] = $data['height'];
}
}
- else if ($delete)
- {
- $submit_ary['avatar'] = '';
- $submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
- }
if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']) || $group_row['group_avatar'] != $submit_ary['avatar'])) || $delete)
{
@@ -593,53 +590,38 @@ class acp_groups
$this->page_title = 'GROUP_MEMBERS';
- // Total number of group leaders
- $sql = 'SELECT COUNT(user_id) AS total_leaders
- FROM ' . USER_GROUP_TABLE . "
- WHERE group_id = $group_id
- AND group_leader = 1";
- $result = $db->sql_query($sql);
- $total_leaders = (int) $db->sql_fetchfield('total_leaders');
- $db->sql_freeresult($result);
-
- // Total number of group members (non-leaders)
- $sql = 'SELECT COUNT(user_id) AS total_members
- FROM ' . USER_GROUP_TABLE . "
- WHERE group_id = $group_id
- AND group_leader <> 1";
- $result = $db->sql_query($sql);
- $total_members = (int) $db->sql_fetchfield('total_members');
- $db->sql_freeresult($result);
-
- // Grab the members
+ // Grab the leaders - always, on every page...
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
- AND u.user_id = ug.user_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 1
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
- $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
-
- $leader = $member = 0;
- $group_data = array(
- 'leader' => array(),
- 'member' => array(),
- );
+ $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
- $type = ($row['group_leader']) ? 'leader' : 'member';
-
- $group_data[$type][$$type]['user_id'] = $row['user_id'];
- $group_data[$type][$$type]['group_id'] = $row['group_id'];
- $group_data[$type][$$type]['username'] = $row['username'];
- $group_data[$type][$$type]['user_regdate'] = $row['user_regdate'];
- $group_data[$type][$$type]['user_posts'] = $row['user_posts'];
- $group_data[$type][$$type]['user_pending'] = ($row['user_pending']) ? 1 : 0;
+ $template->assign_block_vars('leader', array(
+ 'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"),
- $$type++;
+ 'USERNAME' => $row['username'],
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'])
+ );
}
$db->sql_freeresult($result);
+ // Total number of group members (non-leaders)
+ $sql = 'SELECT COUNT(user_id) AS total_members
+ FROM ' . USER_GROUP_TABLE . "
+ WHERE group_id = $group_id
+ AND group_leader = 0";
+ $result = $db->sql_query($sql);
+ $total_members = (int) $db->sql_fetchfield('total_members');
+ $db->sql_freeresult($result);
+
$s_action_options = '';
$options = array('default' => 'DEFAULT', 'approve' => 'APPROVE', 'demote' => 'DEMOTE', 'promote' => 'PROMOTE', 'deleteusers' => 'DELETE');
@@ -664,22 +646,18 @@ class acp_groups
'U_DEFAULT_ALL' => "{$this->u_action}&amp;action=default&amp;g=$group_id")
);
- foreach ($group_data['leader'] as $row)
- {
- $template->assign_block_vars('leader', array(
- 'U_USER_EDIT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&amp;action=edit&amp;u={$row['user_id']}"),
-
- 'USERNAME' => $row['username'],
- 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
- 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
- 'USER_POSTS' => $row['user_posts'],
- 'USER_ID' => $row['user_id'])
- );
- }
+ // Grab the members
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 0
+ ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
+ $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
$pending = false;
- foreach ($group_data['member'] as $row)
+ while ($row = $db->sql_fetchrow($result))
{
if ($row['user_pending'] && !$pending)
{
@@ -700,6 +678,7 @@ class acp_groups
'USER_ID' => $row['user_id'])
);
}
+ $db->sql_freeresult($result);
return;
break;
diff --git a/phpBB/includes/acp/acp_language.php b/phpBB/includes/acp/acp_language.php
index 7dcd64265c..50fb854d54 100644
--- a/phpBB/includes/acp/acp_language.php
+++ b/phpBB/includes/acp/acp_language.php
@@ -147,7 +147,7 @@ class acp_language
$db->sql_query('UPDATE ' . LANG_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
WHERE lang_id = ' . $lang_id);
-
+
add_log('admin', 'LOG_LANGUAGE_PACK_UPDATED', $sql_ary['lang_english_name']);
trigger_error($user->lang['LANGUAGE_DETAILS_UPDATED'] . adm_back_link($this->u_action));
@@ -276,7 +276,9 @@ class acp_language
echo $buffer;
}
fclose($fp);
-
+
+ add_log('admin', 'LOG_LANGUAGE_FILE_SUBMITTED', $this->language_file);
+
exit;
}
else if ($action == 'upload_data')
@@ -340,7 +342,8 @@ class acp_language
trigger_error($user->lang['UPLOAD_COMPLETED'] . adm_back_link($this->u_action . '&amp;action=details&amp;id=' . $lang_id . '&amp;language_file=' . urlencode($selected_lang_file)));
}
-
+
+ add_log('admin', 'LOG_LANGUAGE_FILE_SUBMITTED', $this->language_file);
$action = 'details';
// no break;
@@ -1010,7 +1013,7 @@ class acp_language
* {FILENAME} [{LANG_NAME}]
*
* @package language
-* @version &#36;Id: &#36;
+* @version $' . 'Id: ' . '$
* @copyright (c) ' . date('Y') . ' phpBB Group
* @author {CHANGED} - {AUTHOR}
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php
index 2eb45b4972..a1917b1717 100644
--- a/phpBB/includes/acp/acp_modules.php
+++ b/phpBB/includes/acp/acp_modules.php
@@ -726,7 +726,7 @@ class acp_modules
{
$sql = 'SELECT left_id, right_id
FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND module_id = {$module_data['parent_id']}";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
@@ -744,13 +744,13 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . "
SET left_id = left_id + 2, right_id = right_id + 2
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND left_id > {$row['right_id']}";
$db->sql_query($sql);
$sql = 'UPDATE ' . MODULES_TABLE . "
SET right_id = right_id + 2
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND {$row['left_id']} BETWEEN left_id AND right_id";
$db->sql_query($sql);
@@ -761,7 +761,7 @@ class acp_modules
{
$sql = 'SELECT MAX(right_id) AS right_id
FROM ' . MODULES_TABLE . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'";
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -805,7 +805,7 @@ class acp_modules
$sql = 'UPDATE ' . MODULES_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $update_ary) . "
- WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
+ WHERE module_class = '" . $db->sql_escape($module_data['module_class']) . "'
AND module_id = {$module_data['module_id']}";
$db->sql_query($sql);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 8639df6ab0..d3638f1941 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2111,7 +2111,7 @@ function bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_po
}
// Check bumper, only topic poster and last poster are allowed to bump
- if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'] && !$auth->acl_get('m_', $forum_id))
+ if ($topic_poster != $user->data['user_id'] && $last_topic_poster != $user->data['user_id'])
{
return false;
}
diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php
index fe72f3fa9e..e8c57a4db6 100644
--- a/phpBB/includes/functions_convert.php
+++ b/phpBB/includes/functions_convert.php
@@ -304,7 +304,7 @@ function decode_ip($int_ip)
{
if (!$int_ip)
{
- return '';
+ return '127.0.0.1';
}
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
@@ -315,7 +315,7 @@ function decode_ip($int_ip)
return '';
}
- return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
+ return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);
}
/**
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index e62bf674e6..f63d6a7da7 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -252,7 +252,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$forum_unread = (isset($forum_tracking_info[$forum_id]) && $row['orig_forum_last_post_time'] > $forum_tracking_info[$forum_id]) ? true : false;
- $folder_image = $folder_alt = $subforums_list = $l_subforums = '';
+ $folder_image = $folder_alt = $l_subforums = '';
+ $subforums_list = array();
// Generate list of subforums if we need to
if (isset($subforums[$forum_id]))
@@ -267,8 +268,10 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
if ($subforum_row['display'] && $subforum_row['name'])
{
- $subforums_list .= ($subforums_list == '') ? '' : ', ';
- $subforums_list .= '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id) . '">' . $subforum_row['name'] . '</a>';
+ $subforums_list[] = array(
+ 'link' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id),
+ 'name' => $subforum_row['name']
+ );
}
else
{
@@ -327,11 +330,19 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
$l_post_click_count = ($row['forum_type'] == FORUM_LINK) ? 'CLICKS' : 'POSTS';
$post_click_count = ($row['forum_type'] != FORUM_LINK || $row['forum_flags'] & FORUM_FLAG_LINK_TRACK) ? $row['forum_posts'] : '';
+ $s_subforums_list = array();
+ foreach ($subforums_list as $subforum)
+ {
+ $s_subforums_list[] = '<a href="' . $subforum['link'] . '">' . $subforum['name'] . '</a>';
+ }
+ $s_subforums_list = (string) implode(', ', $s_subforums_list);
+
$template->assign_block_vars('forumrow', array(
'S_IS_CAT' => false,
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
'S_UNREAD_FORUM' => $forum_unread,
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
+ 'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
'FORUM_ID' => $row['forum_id'],
'FORUM_NAME' => $row['forum_name'],
@@ -342,13 +353,13 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'FORUM_FOLDER_IMG_SRC' => $user->img($folder_image, $folder_alt, false, '', 'src'),
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
- 'SUBFORUMS' => $subforums_list,
'LAST_POST_SUBJECT' => censor_text($last_post_subject),
'LAST_POST_TIME' => $last_post_time,
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'LAST_POSTER_FULL' => get_username_string('full', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'MODERATORS' => $moderators_list,
+ 'SUBFORUMS' => $s_subforums_list,
'L_SUBFORUM_STR' => $l_subforums,
'L_FORUM_FOLDER_ALT' => $folder_alt,
@@ -358,6 +369,15 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
'U_LAST_POSTER' => get_username_string('profile', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
'U_LAST_POST' => $last_post_url)
);
+
+ // Assign subforums loop for style authors
+ foreach ($subforums_list as $subforum)
+ {
+ $template->assign_block_vars('forumrow.subforum', array(
+ 'U_SUBFORUM' => $subforum['link'],
+ 'SUBFORUM_NAME' => $subforum['name'])
+ );
+ }
}
$template->assign_vars(array(
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index d63a31ffb5..dd84533b23 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -846,7 +846,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = '')
// From this point onward most server response codes should be 250
// Specify who the mail is from....
- $smtp->server_send('MAIL FROM:<' . $config['board_contact'] . '>');
+ $smtp->server_send('MAIL FROM:<' . $config['board_email'] . '>');
if ($err_msg = $smtp->server_parse('250', __LINE__))
{
$smtp->close_session($err_msg);
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index 6df1b838b2..3e3ee90c1b 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -1755,17 +1755,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
// Those are group-only attributes
$group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit', 'group_founder_manage');
- // Check data
- if (!utf8_strlen($name) || utf8_strlen($name) > 40)
+ // Check data. Limit group name length.
+ if (!utf8_strlen($name) || utf8_strlen($name) > 60)
{
$error[] = (!utf8_strlen($name)) ? $user->lang['GROUP_ERR_USERNAME'] : $user->lang['GROUP_ERR_USER_LONG'];
}
- if (utf8_strlen($desc) > 255)
- {
- $error[] = $user->lang['GROUP_ERR_DESC_LONG'];
- }
-
if (!in_array($type, array(GROUP_OPEN, GROUP_CLOSED, GROUP_HIDDEN, GROUP_SPECIAL, GROUP_FREE)))
{
$error[] = $user->lang['GROUP_ERR_TYPE'];
@@ -2420,7 +2415,8 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_
$sql = 'SELECT ug.*, u.username, u.username_clean, u.user_email
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
- WHERE ug.user_id = u.user_id AND ';
+ WHERE ug.user_id = u.user_id
+ AND ug.user_pending = 0 AND ';
if ($group_id_ary)
{
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index 2f02a21a3f..3f11c96e21 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -28,11 +28,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
unset($_POST['sk'], $_POST['sd'], $_REQUEST['sk'], $_REQUEST['sd']);
}
- $forum_id = $forum_info['forum_id'];
- $start = request_var('start', 0);
- $topic_id_list = request_var('topic_id_list', array(0));
- $post_id_list = request_var('post_id_list', array(0));
- $topic_id = request_var('t', 0);
+ $forum_id = $forum_info['forum_id'];
+ $start = request_var('start', 0);
+ $topic_id_list = request_var('topic_id_list', array(0));
+ $post_id_list = request_var('post_id_list', array(0));
+ $source_topic_id = request_var('t', 0);
// Resync Topics
if ($action == 'resync')
@@ -216,7 +216,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
$topic_row = array_merge($topic_row, array(
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&amp;f=$forum_id&amp;t={$row['topic_id']}&amp;mode=topic_view"),
- 'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $topic_id) ? true : false,
+ 'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $source_topic_id) ? true : false,
'U_SELECT_TOPIC' => $url . "&amp;i=$id&amp;mode=topic_view&amp;action=merge&amp;to_topic_id=" . $row['topic_id'] . $selected_ids,
'U_MCP_QUEUE' => $u_mcp_queue,
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&amp;mode=topic_view&amp;t=' . $row['topic_id'] . '&amp;action=reports') : '',
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index 6733a73a7e..0367092726 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -64,6 +64,8 @@ class mcp_queue
{
case 'approve_details':
+ $this->tpl_name = 'mcp_post';
+
$user->add_lang('posting');
$post_id = request_var('p', 0);
@@ -167,8 +169,6 @@ class mcp_queue
'POST_ID' => $post_info['post_id'])
);
- $this->tpl_name = 'mcp_post';
-
break;
case 'unapproved_topics':
diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php
index 98d008da2c..418b68e436 100644
--- a/phpBB/includes/ucp/ucp_groups.php
+++ b/phpBB/includes/ucp/ucp_groups.php
@@ -312,7 +312,7 @@ class ucp_groups
// Hide hidden groups unless user is an admin with group privileges
$sql_and = ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) ? '<> ' . GROUP_SPECIAL : 'NOT IN (' . GROUP_SPECIAL . ', ' . GROUP_HIDDEN . ')';
- $sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type
+ $sql = 'SELECT group_id, group_name, group_desc, group_desc_uid, group_desc_bitfield, group_desc_options, group_type, group_founder_manage
FROM ' . GROUPS_TABLE . '
WHERE ' . ((sizeof($group_id_ary)) ? $db->sql_in_set('group_id', $group_id_ary, true) . ' AND ' : '') . "
group_type $sql_and
@@ -392,6 +392,12 @@ class ucp_groups
{
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
+
+ // Check if the user is allowed to manage this group if set to founder only.
+ if ($user->data['user_type'] != USER_FOUNDER && $group_row['group_founder_manage'])
+ {
+ trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . $return_page, E_USER_WARNING);
+ }
}
switch ($action)
@@ -403,10 +409,16 @@ class ucp_groups
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
$file_uploads = (@ini_get('file_uploads') || strtolower(@ini_get('file_uploads')) == 'on') ? true : false;
$user->add_lang(array('acp/groups', 'acp/common'));
@@ -487,6 +499,34 @@ class ucp_groups
$submit_ary['avatar'] = '';
$submit_ary['avatar_type'] = $submit_ary['avatar_width'] = $submit_ary['avatar_height'] = 0;
}
+ else if ($data['width'] && $data['height'])
+ {
+ // Only update the dimensions?
+ if ($config['avatar_max_width'] || $config['avatar_max_height'])
+ {
+ if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ if ($config['avatar_min_width'] || $config['avatar_min_height'])
+ {
+ if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
+ {
+ $error[] = sprintf($user->lang['AVATAR_WRONG_SIZE'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], $data['width'], $data['height']);
+ }
+ }
+ }
+
+ if (!sizeof($error))
+ {
+ $submit_ary['avatar_width'] = $data['width'];
+ $submit_ary['avatar_height'] = $data['height'];
+ }
+ }
if ((isset($submit_ary['avatar']) && $submit_ary['avatar'] && (!isset($group_row['group_avatar']) || $group_row['group_avatar'] != $submit_ary['avatar'])) || $delete)
{
@@ -656,29 +696,57 @@ class ucp_groups
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
$user->add_lang(array('acp/groups', 'acp/common'));
+ $start = request_var('start', 0);
+
+ // Grab the leaders - always, on every page...
+ $sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
+ FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
+ WHERE ug.group_id = $group_id
+ AND u.user_id = ug.user_id
+ AND ug.group_leader = 1
+ ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
+ $result = $db->sql_query($sql);
+
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $template->assign_block_vars('leader', array(
+ 'USERNAME' => $row['username'],
+ 'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
+ 'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
+ 'JOINED' => ($row['user_regdate']) ? $user->format_date($row['user_regdate']) : ' - ',
+ 'USER_POSTS' => $row['user_posts'],
+ 'USER_ID' => $row['user_id'])
+ );
+ }
+ $db->sql_freeresult($result);
// Total number of group members (non-leaders)
$sql = 'SELECT COUNT(user_id) AS total_members
FROM ' . USER_GROUP_TABLE . "
WHERE group_id = $group_id
- AND group_leader <> 1";
+ AND group_leader = 0";
$result = $db->sql_query($sql);
$total_members = (int) $db->sql_fetchfield('total_members');
$db->sql_freeresult($result);
- $start = request_var('start', 0);
-
// Grab the members
$sql = 'SELECT u.user_id, u.username, u.username_clean, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending
FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug
WHERE ug.group_id = $group_id
AND u.user_id = ug.user_id
+ AND ug.group_leader = 0
ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username_clean";
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
@@ -695,7 +763,7 @@ class ucp_groups
$pending = true;
}
- $template->assign_block_vars($row['group_leader'] ? 'leader' : 'member', array(
+ $template->assign_block_vars('member', array(
'USERNAME' => $row['username'],
'U_USER_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $row['user_id']),
'S_GROUP_DEFAULT' => ($row['group_id'] == $group_id) ? true : false,
@@ -734,10 +802,16 @@ class ucp_groups
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
$user->add_lang('acp/groups');
@@ -755,10 +829,16 @@ class ucp_groups
trigger_error($user->lang['NO_GROUP'] . $return_page);
}
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
if (confirm_box(true))
{
@@ -823,10 +903,16 @@ class ucp_groups
$user->add_lang(array('acp/groups', 'acp/common'));
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
if (confirm_box(true))
{
@@ -873,10 +959,16 @@ class ucp_groups
trigger_error($user->lang['NO_USERS'] . $return_page);
}
- if (!($row = group_memberships($group_id, $user->data['user_id'])) || !$row[0]['group_leader'])
+ if (!($row = group_memberships($group_id, $user->data['user_id'])))
{
trigger_error($user->lang['NOT_MEMBER_OF_GROUP'] . $return_page);
}
+ list(, $row) = each($row);
+
+ if (!$row['group_leader'])
+ {
+ trigger_error($user->lang['NOT_LEADER_OF_GROUP'] . $return_page);
+ }
$name_ary = array_unique(explode("\n", $name_ary));
$group_name = ($group_row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $group_row['group_name']] : $group_row['group_name'];
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index ce6087f424..c228e8daba 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -642,7 +642,7 @@ function compose_pm($id, $mode, $action)
$post_id = request_var('p', 0);
if ($config['allow_post_links'])
{
- $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$message_subject}[/url]\n\n";
+ $message_link = "[url=" . generate_board_url() . "/viewtopic.$phpEx?p={$post_id}#p{$post_id}]{$user->lang['SUBJECT']}: {$message_subject}[/url]\n\n";
}
else
{
diff --git a/phpBB/index.php b/phpBB/index.php
index 53b9d4754f..84faea917f 100644
--- a/phpBB/index.php
+++ b/phpBB/index.php
@@ -88,7 +88,7 @@ $template->assign_vars(array(
'TOTAL_POSTS' => sprintf($user->lang[$l_total_post_s], $total_posts),
'TOTAL_TOPICS' => sprintf($user->lang[$l_total_topic_s], $total_topics),
'TOTAL_USERS' => sprintf($user->lang[$l_total_user_s], $total_users),
- 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $newest_uid) . '" style="color:#' . $config['newest_user_colour'] . '">', $newest_user, '</a>'),
+ 'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&amp;u=' . $newest_uid) . '"' . (($config['newest_user_colour']) ? ' style="color:#' . $config['newest_user_colour'] . '"' : '') . '>', $newest_user, '</a>'),
'LEGEND' => $legend,
'BIRTHDAY_LIST' => $birthday_list,
diff --git a/phpBB/language/en/acp/attachments.php b/phpBB/language/en/acp/attachments.php
index 121069a6f8..f43835c7b0 100644
--- a/phpBB/language/en/acp/attachments.php
+++ b/phpBB/language/en/acp/attachments.php
@@ -115,7 +115,7 @@ $lang = array_merge($lang, array(
'NO_EXT_GROUP_SPECIFIED' => 'No extension group specified.',
'NO_FILE_CAT' => 'None',
'NO_IMAGE' => 'No image',
- 'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled because there is no supported GD library available and the imagemagick executable could not be found.',
+ 'NO_THUMBNAIL_SUPPORT' => 'Thumbnail support has been disabled. For proper functionality either the GD extension need to be available or imagemagick being installed. Both were not found.',
'NO_UPLOAD_DIR' => 'The upload directory you specified does not exist.',
'NO_WRITE_UPLOAD' => 'The upload directory you specified cannot be written to. Please alter the permissions to allow the webserver to write to it.',
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 27e0e7afa3..054101147e 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -277,7 +277,7 @@ $lang = array_merge($lang, array(
// Logs
$lang = array_merge($lang, array(
'ACP_ADMIN_LOGS_EXPLAIN' => 'This lists all the actions carried out by board administrators. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
- 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. These log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
+ 'ACP_CRITICAL_LOGS_EXPLAIN' => 'This lists the actions carried out by the board itself. This log provides you with information you are able to use for solving specific problems, for example non-delivery of emails. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
'ACP_MOD_LOGS_EXPLAIN' => 'This lists the actions carried out by board moderators, select a forum from the drop down list. You can sort by username, date, IP or action. If you have appropriate permissions you can also clear individual operations or the log as a whole.',
'ACP_USERS_LOGS_EXPLAIN' => 'This lists all actions carried out by users or on users.',
'ALL_ENTRIES' => 'All entries',
@@ -533,6 +533,7 @@ $lang = array_merge($lang, array(
'LOG_LANGUAGE_PACK_INSTALLED' => '<strong>Installed language pack</strong><br />» %s',
'LOG_LANGUAGE_PACK_UPDATED' => '<strong>Updated language pack details</strong><br />» %s',
'LOG_LANGUAGE_FILE_REPLACED' => '<strong>Replaced language file</strong><br />» %s',
+ 'LOG_LANGUAGE_FILE_SUBMITTED' => '<strong>Submitted language file and placed in store folder</strong><br />» %s',
'LOG_MASS_EMAIL' => '<strong>Sent mass email</strong><br />» %s',
diff --git a/phpBB/language/en/acp/email.php b/phpBB/language/en/acp/email.php
index e57b2a8bea..14ee520b04 100644
--- a/phpBB/language/en/acp/email.php
+++ b/phpBB/language/en/acp/email.php
@@ -32,7 +32,7 @@ if (empty($lang) || !is_array($lang))
// Email settings
$lang = array_merge($lang, array(
- 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed',
+ 'ACP_MASS_EMAIL_EXPLAIN' => 'Here you can email a message to either all of your users or all users of a specific group <strong>having the option to receive mass emails enabled</strong>. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed',
'ALL_USERS' => 'All users',
'COMPOSE' => 'Compose',
diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php
index dbe22e2154..f69ac02168 100644
--- a/phpBB/language/en/acp/groups.php
+++ b/phpBB/language/en/acp/groups.php
@@ -60,7 +60,7 @@ $lang = array_merge($lang, array(
'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.',
'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group',
'GROUP_FOUNDER_MANAGE' => 'Founder manage only',
- 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict group management for this group for founders only for the administration control panel.',
+ 'GROUP_FOUNDER_MANAGE_EXPLAIN' => 'Restrict group management for this group for founders only. Users having group permissions are still able to see this group as well as this groups members.',
'GROUP_HIDDEN' => 'Hidden',
'GROUP_LANG' => 'Group language',
'GROUP_LEAD' => 'Group leaders',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index d4fd7bd4af..853df84f85 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -208,10 +208,9 @@ $lang = array_merge($lang, array(
'GOTO_PAGE' => 'Go to page',
'GROUP' => 'Group',
'GROUPS' => 'Groups',
- 'GROUP_ERR_DESC_LONG' => 'Group description is too long.',
'GROUP_ERR_TYPE' => 'Inappropriate group type specified.',
'GROUP_ERR_USERNAME' => 'No group name specified.',
- 'GROUP_ERR_USER_LONG' => 'Group name is too long.',
+ 'GROUP_ERR_USER_LONG' => 'Group name is too long. A maximum of 60 characters are allowed.',
'GUEST' => 'Guest',
'GUEST_USERS_ONLINE' => 'There are %d guest users online',
'GUEST_USERS_TOTAL' => '%d guests',
@@ -316,7 +315,7 @@ $lang = array_merge($lang, array(
'NEXT' => 'Next',
'NEVER' => 'Never',
'NO' => 'No',
- 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group from the “Administration Control Panel”.',
+ 'NOT_ALLOWED_MANAGE_GROUP' => 'You are not allowed to manage this group.',
'NOT_AUTHORIZED' => 'You are not authorised to access this area.',
'NOT_WATCHING_FORUM' => 'You are no longer subscribed to updates on this forum.',
'NOT_WATCHING_TOPIC' => 'You are no longer subscribed to this topic.',
diff --git a/phpBB/language/en/groups.php b/phpBB/language/en/groups.php
index 8e44d32a0d..bd11356684 100644
--- a/phpBB/language/en/groups.php
+++ b/phpBB/language/en/groups.php
@@ -72,7 +72,7 @@ $lang = array_merge($lang, array(
'NO_LEADERS' => 'You are not a leader of any group',
'NOT_LEADER_OF_GROUP' => 'The requested operation cannot be taken because you are not a leader of the selected group.',
- 'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group.',
+ 'NOT_MEMBER_OF_GROUP' => 'The requested operation cannot be taken because you are not a member of the selected group or your membership has not been approved yet.',
'NOT_RESIGN_FROM_DEFAULT_GROUP' => 'You are not allowed to resign from your default group.',
'PRIMARY_GROUP' => 'Primary group',
diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php
index 837ae6f9b1..7c5df74d5f 100644
--- a/phpBB/language/en/mcp.php
+++ b/phpBB/language/en/mcp.php
@@ -189,6 +189,8 @@ $lang = array_merge($lang, array(
'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic.<br />Please enter the destination topic id or click on the "Select" button to search for one',
'MERGE_TOPIC_ID' => 'Destination topic identification number',
'MODERATE_FORUM' => 'Moderate forum',
+ 'MODERATE_TOPIC' => 'Moderate topic',
+ 'MODERATE_POST' => 'Moderate post',
'MOD_OPTIONS' => 'Moderator options',
'MORE_INFO' => 'Further information',
'MOST_WARNINGS' => 'Users with most warnings',
diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php
index 2b486f8b8c..d5e8450699 100644
--- a/phpBB/language/en/posting.php
+++ b/phpBB/language/en/posting.php
@@ -121,7 +121,7 @@ $lang = array_merge($lang, array(
'MESSAGE_DELETED' => 'This message has been deleted successfully',
'MORE_SMILIES' => 'View more smilies',
- 'NOTIFY_REPLY' => 'Send me an email when a reply is posted',
+ 'NOTIFY_REPLY' => 'Notify me when a reply is posted',
'NOT_UPLOADED' => 'File could not be uploaded.',
'NO_DELETE_POLL_OPTIONS' => 'You cannot delete existing poll options',
'NO_PM_ICON' => 'No PM icon',
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index 9a22289495..d382cdd50e 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -220,6 +220,14 @@ $module->load_active();
// Assign data to the template engine for the list of modules
$module->assign_tpl_vars(append_sid("{$phpbb_root_path}mcp.$phpEx"));
+// Generate urls for letting the moderation control panel being accessed in different modes
+$template->assign_vars(array(
+ 'U_MCP' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main'),
+ 'U_MCP_FORUM' => ($forum_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;f=$forum_id") : '',
+ 'U_MCP_TOPIC' => ($forum_id && $topic_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;t=$topic_id") : '',
+ 'U_MCP_POST' => ($forum_id && $topic_id && $post_id) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;t=$topic_id&amp;p=$post_id") : '',
+));
+
// Generate the page, do not display/query online list
$module->display($module->get_page_title(), false);
@@ -246,6 +254,11 @@ function _module_ban_url($mode, &$module_row)
return extra_url();
}
+function _module_queue_url($mode, &$module_row)
+{
+ return extra_url();
+}
+
function extra_url()
{
global $forum_id, $topic_id, $post_id, $user_id;
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 3d8c2bf767..425a710e65 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -355,18 +355,9 @@ switch ($mode)
}
// Get user...
- if ($username)
- {
- $sql = 'SELECT *
- FROM ' . USERS_TABLE . "
- WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
- }
- else
- {
- $sql = 'SELECT *
- FROM ' . USERS_TABLE . "
- WHERE user_id = $user_id";
- }
+ $sql = 'SELECT *
+ FROM ' . USERS_TABLE . '
+ WHERE ' . (($username) ? "username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'" : "user_id = $user_id");
// a_user admins and founder are able to view inactive users and bots to be able to
// manage them more easily
@@ -390,8 +381,9 @@ switch ($mode)
$sql = 'SELECT g.group_id, g.group_name, g.group_type
FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . " ug
WHERE ug.user_id = $user_id
- AND g.group_id = ug.group_id" . ((!$auth->acl_get('a_group')) ? ' AND group_type <> ' . GROUP_HIDDEN : '') . '
- ORDER BY group_type, group_name';
+ AND g.group_id = ug.group_id" . ((!$auth->acl_get('a_group')) ? ' AND g.group_type <> ' . GROUP_HIDDEN : '') . '
+ AND ug.user_pending = 0
+ ORDER BY g.group_type, g.group_name';
$result = $db->sql_query($sql);
$group_options = '';
diff --git a/phpBB/styles/subSilver/template/mcp_header.html b/phpBB/styles/subSilver/template/mcp_header.html
index 817aeff3a1..043be1d089 100644
--- a/phpBB/styles/subSilver/template/mcp_header.html
+++ b/phpBB/styles/subSilver/template/mcp_header.html
@@ -1,19 +1,20 @@
<!-- INCLUDE overall_header.html -->
-<!-- IF TOPIC_TITLE or FORUM_NAME -->
- <div id="pageheader">
- <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
+<div id="pageheader">
+ <!-- IF U_MCP -->
+ <p class="linkmcp">
+ [ <a href="{U_MCP}">{L_MCP}</a><!-- IF U_MCP_FORUM --> | <a href="{U_MCP_FORUM}">{L_MODERATE_FORUM}</a><!-- ENDIF -->
+ <!-- IF U_MCP_TOPIC --> | <a href="{U_MCP_TOPIC}">{L_MODERATE_TOPIC}</a><!-- ENDIF -->
+ <!-- IF U_MCP_POST --> | <a href="{U_MCP_POST}">{L_MODERATE_POST}</a><!-- ENDIF --> ]
+ </p>
+ <!-- ENDIF -->
- <!-- IF MODERATORS -->
- <p class="moderators">{L_MODERATORS}: {MODERATORS}</p>
- <!-- ENDIF -->
- <!-- IF U_MCP -->
- <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p>
- <!-- ENDIF -->
- </div>
+ <!-- IF TOPIC_TITLE or FORUM_NAME -->
+ <h2><!-- IF TOPIC_TITLE --><a class="titles" href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><!-- ELSE --><a class="titles" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><!-- ENDIF --></h2>
+ <!-- ENDIF -->
+</div>
- <br clear="all" />
-<!-- ENDIF -->
+<br clear="all" />
<div id="pagecontent">
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 15058f1295..1c05af3d11 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1331,8 +1331,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]) )
{
// It is safe to grab the username from the user cache array, we are at the last
- // post and only the topic poster and last poster are allowed to bump. However, a
- // check is still needed incase an admin bumped the topic (but didn't post in the topic)
+ // post and only the topic poster and last poster are allowed to bump.
+ // Admins and mods are bound to the above rules too...
$l_bumped_by = '<br /><br />' . sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time']));
}
else
@@ -1382,9 +1382,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'BUMPED_MESSAGE' => $l_bumped_by,
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
- 'POST_ICON_IMG' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
- 'POST_ICON_IMG_WIDTH' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
- 'POST_ICON_IMG_HEIGHT' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',
+ 'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '',
+ 'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '',
+ 'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '',
'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'],
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),