diff --git a/phpBB/adm/style/acp_groups.html b/phpBB/adm/style/acp_groups.html index ebff155a6e..e2ed9d4529 100644 --- a/phpBB/adm/style/acp_groups.html +++ b/phpBB/adm/style/acp_groups.html @@ -54,6 +54,12 @@
{L_GROUP_SETTINGS_SAVE} + +
+

{L_GROUP_FOUNDER_MANAGE_EXPLAIN}
+
+
+
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index 00918f7d68..50de293b33 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -933,8 +933,8 @@ function get_schema_struct() $schema_data['phpbb_config'] = array( 'COLUMNS' => array( - 'config_name' => array('VCHAR:255', ''), - 'config_value' => array('VCHAR', ''), + 'config_name' => array('VCHAR', ''), + 'config_value' => array('VCHAR_UNI', ''), 'is_dynamic' => array('BOOL', 0), ), 'PRIMARY_KEY' => 'config_name', @@ -1089,6 +1089,7 @@ function get_schema_struct() 'COLUMNS' => array( 'group_id' => array('UINT', NULL, 'auto_increment'), 'group_type' => array('TINT:4', 1), + 'group_founder_manage' => array('BOOL', 0), 'group_name' => array('VCHAR_CI', ''), 'group_desc' => array('TEXT_UNI', ''), 'group_desc_bitfield' => array('VCHAR:255', ''), @@ -1889,7 +1890,7 @@ function get_schema_struct() 'user_msnm' => array('VCHAR_UNI', ''), 'user_jabber' => array('VCHAR_UNI', ''), 'user_website' => array('VCHAR_UNI:200', ''), - 'user_occ' => array('VCHAR_UNI', ''), + 'user_occ' => array('TEXT_UNI', ''), 'user_interests' => array('TEXT_UNI', ''), 'user_actkey' => array('VCHAR:32', ''), 'user_newpasswd' => array('VCHAR_UNI:32', ''), diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index a4e860b7bc..44ab731072 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -126,7 +126,7 @@ class acp_ban AND u.user_id = b.ban_userid AND b.ban_userid <> 0 AND u.user_id <> ' . ANONYMOUS . ' - ORDER BY u.username ASC'; + ORDER BY u.username_clean ASC'; break; case 'ip': diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index fb58c33897..a418f279e8 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -54,6 +54,12 @@ class acp_groups { trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action), E_USER_WARNING); } + + // 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'] . adm_back_link($this->u_action), E_USER_WARNING); + } } // Which page? @@ -263,13 +269,22 @@ class acp_groups $delete = request_var('delete', ''); $submit_ary = array( - 'colour' => request_var('group_colour', ''), - 'rank' => request_var('group_rank', 0), - 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0, - 'legend' => isset($_REQUEST['group_legend']) ? 1 : 0, - 'message_limit' => request_var('group_message_limit', 0) + 'colour' => request_var('group_colour', ''), + 'rank' => request_var('group_rank', 0), + 'receive_pm' => isset($_REQUEST['group_receive_pm']) ? 1 : 0, + 'legend' => isset($_REQUEST['group_legend']) ? 1 : 0, + 'message_limit' => request_var('group_message_limit', 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']) { $data['width'] = request_var('width', ''); @@ -329,7 +344,7 @@ class acp_groups // were made. $group_attributes = array(); - $test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit'); + $test_variables = array('rank', 'colour', 'avatar', 'avatar_type', 'avatar_width', 'avatar_height', 'receive_pm', 'legend', 'message_limit', 'founder_manage'); foreach ($test_variables as $test) { if (isset($submit_ary[$test]) && ($action == 'add' || $group_row['group_' . $test] != $submit_ary[$test])) @@ -483,16 +498,19 @@ class acp_groups 'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false, 'S_DISPLAY_GALLERY' => ($config['allow_avatar_local'] && !$display_gallery) ? true : false, 'S_IN_GALLERY' => ($config['allow_avatar_local'] && $display_gallery) ? true : false, + 'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, 'ERROR_MSG' => (sizeof($error)) ? implode('
', $error) : '', 'GROUP_NAME' => ($group_type == GROUP_SPECIAL) ? $user->lang['G_' . $group_name] : $group_name, 'GROUP_INTERNAL_NAME' => $group_name, 'GROUP_DESC' => $group_desc_data['text'], 'GROUP_RECEIVE_PM' => (isset($group_row['group_receive_pm']) && $group_row['group_receive_pm']) ? ' checked="checked"' : '', + 'GROUP_FOUNDER_MANAGE' => (isset($group_row['group_founder_manage']) && $group_row['group_founder_manage']) ? ' checked="checked"' : '', 'GROUP_LEGEND' => (isset($group_row['group_legend']) && $group_row['group_legend']) ? ' checked="checked"' : '', 'GROUP_MESSAGE_LIMIT' => (isset($group_row['group_message_limit'])) ? $group_row['group_message_limit'] : 0, 'GROUP_COLOUR' => (isset($group_row['group_colour'])) ? $group_row['group_colour'] : '', + 'S_DESC_BBCODE_CHECKED' => $group_desc_data['allow_bbcode'], 'S_DESC_URLS_CHECKED' => $group_desc_data['allow_urls'], 'S_DESC_SMILIES_CHECKED'=> $group_desc_data['allow_smilies'], diff --git a/phpBB/includes/acp/acp_inactive.php b/phpBB/includes/acp/acp_inactive.php index 2834d25181..68eeaab5b4 100755 --- a/phpBB/includes/acp/acp_inactive.php +++ b/phpBB/includes/acp/acp_inactive.php @@ -132,7 +132,7 @@ class acp_inactive // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('i' => $user->lang['SORT_INACTIVE'], 'j' => $user->lang['SORT_REG_DATE'], 'l' => $user->lang['SORT_LAST_VISIT'], 'r' => $user->lang['SORT_REASON'], 'u' => $user->lang['SORT_USERNAME']); - $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username'); + $sort_by_sql = array('i' => 'user_inactive_time', 'j' => 'user_regdate', 'l' => 'user_lastvisit', 'r' => 'user_inactive_reason', 'u' => 'username_clean'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php index d233d7c885..211b932115 100644 --- a/phpBB/includes/acp/acp_logs.php +++ b/phpBB/includes/acp/acp_logs.php @@ -68,7 +68,7 @@ class acp_logs // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'u.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -127,8 +127,8 @@ class acp_logs } $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], - 'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username'] : '', + 'USERNAME' => $row['username_full'], + 'REPORTEE_USERNAME' => ($row['reportee_username'] && $row['user_id'] != $row['reportee_id']) ? $row['reportee_username_full'] : '', 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index a321057fa2..d7e327e4d3 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -324,7 +324,7 @@ class acp_main foreach ($log_data as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => $row['action']) diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 72b87c3b92..c426e4607d 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -265,7 +265,7 @@ class acp_modules // Category/not category? $is_cat = (!$module_data['module_basename']) ? true : false; - // Get module informations + // Get module information $module_infos = $this->get_module_infos(); // Build name options @@ -488,7 +488,7 @@ class acp_modules } /** - * Get available module informations from module files + * Get available module information from module files */ function get_module_infos($module = '', $module_class = false) { diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 9ce7f3ed92..8bfe2b8b36 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -936,7 +936,7 @@ class acp_profile $field_id = request_var('field_id', 0); - // Collect all informations, if something is going wrong, abort the operation + // Collect all information, if something is going wrong, abort the operation $profile_sql = $profile_lang = $empty_lang = $profile_lang_fields = array(); $default_lang_id = $lang_defs['iso'][$config['default_lang']]; diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index b4103da463..314514b8e2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -949,7 +949,7 @@ class acp_users // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'l.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -977,7 +977,7 @@ class acp_users foreach ($log_data as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => nl2br($row['action']), @@ -1185,7 +1185,7 @@ class acp_users case 'prefs': $data = array( - 'dateformat' => request_var('dateformat', $user_row['user_dateformat']), + 'dateformat' => request_var('dateformat', $user_row['user_dateformat'], true), 'lang' => request_var('lang', $user_row['user_lang']), 'tz' => request_var('tz', (float) $user_row['user_timezone']), 'style' => request_var('style', $user_row['user_style']), @@ -1843,6 +1843,19 @@ class acp_users trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } + // Check the founder only entry for this group to make sure everything is well + $sql = 'SELECT group_founder_manage + FROM ' . GROUPS_TABLE . ' + WHERE group_id = ' . $group_id; + $result = $db->sql_query($sql); + $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); + $db->sql_freeresult($result); + + if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) + { + trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + // Add user/s to group if ($error = group_user_add($group_id, $user_id)) { @@ -1877,7 +1890,7 @@ class acp_users $db->sql_freeresult($result); // Select box for other groups - $sql = 'SELECT group_id, group_name, group_type + $sql = 'SELECT group_id, group_name, group_type, group_founder_manage FROM ' . GROUPS_TABLE . ' ' . ((sizeof($id_ary)) ? 'WHERE ' . $db->sql_in_set('group_id', $id_ary, true) : '') . ' ORDER BY group_type DESC, group_name ASC'; @@ -1891,6 +1904,12 @@ class acp_users continue; } + // Do not display those groups not allowed to be managed + if ($user->data['user_type'] != USER_FOUNDER && $row['group_founder_manage']) + { + continue; + } + $s_group_options .= '' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . ''; } $db->sql_freeresult($result); diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index bc17e4b4ae..35b0cd29e2 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -293,7 +293,7 @@ class auth_admin extends auth $sql = 'SELECT user_id as ug_id, username as ug_name FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', array_keys($hold_ary)) . ' - ORDER BY username ASC'; + ORDER BY username_clean ASC'; } else { @@ -606,7 +606,7 @@ class auth_admin extends auth $sql = 'SELECT user_id, username FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('user_id', $auth_ary['users']) . ' - ORDER BY username'; + ORDER BY username_clean ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 409aab18e4..9536abddd3 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -221,7 +221,7 @@ class bbcode { $this->bbcode_cache[$bbcode_id] = array( 'preg' => array( - '#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id)), + '#\[img:$uid\](.*?)\[/img:$uid\]#s' => str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id, true)), ) ); } @@ -300,7 +300,7 @@ class bbcode { $this->bbcode_cache[$bbcode_id] = array( 'preg' => array( - '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id))) + '#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#' => str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id, true))) ) ); } @@ -381,7 +381,7 @@ class bbcode /** * Return bbcode template */ - function bbcode_tpl($tpl_name, $bbcode_id = -1) + function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false) { if (empty($bbcode_hardtpl)) { @@ -403,7 +403,7 @@ class bbcode $template_bitfield = new bitfield($this->template_bitfield); } - if ($bbcode_id != -1 && !$template_bitfield->get($bbcode_id)) + if ($bbcode_id != -1 && !$template_bitfield->get($bbcode_id) && !$skip_bitfield_check) { return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false; } diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index dac39e5940..001702a39e 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1865,7 +1865,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa } } - // The result parameter is always an array, holding the relevant informations... + // The result parameter is always an array, holding the relevant information... if ($result['status'] == LOGIN_SUCCESS) { $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx"); @@ -2676,7 +2676,7 @@ function get_backtrace() $trace['file'] = substr($trace['file'], 1); $args = array(); - // If include/require/include_once is not called, do not show arguments - they may contain sensible informations + // If include/require/include_once is not called, do not show arguments - they may contain sensible information if (!in_array($trace['function'], array('include', 'require', 'include_once'))) { unset($trace['args']); @@ -2773,11 +2773,12 @@ function truncate_string($string, $max_length = 60, $allow_reply = true) * @param int $user_id The users id * @param string $username The users name * @param string $username_colour The users colour -* @param string $guest_username optional field to specify the guest username. It will be used in favor of the GUEST language variable then. +* @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. +* @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} * * @return string A string consisting of what is wanted based on $mode. */ -function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false) +function get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) { global $phpbb_root_path, $phpEx, $user; @@ -2796,7 +2797,8 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', // Only show the link if not anonymous if ($user_id && $user_id != ANONYMOUS) { - $profile_url = append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id); + $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); + $profile_url .= '&u=' . (int) $user_id; $full_string = '' . $username . ''; } else @@ -3116,7 +3118,7 @@ function page_header($page_title = '', $display_online_list = true) $reading_sql . ((!$config['load_online_guests']) ? ' AND s.session_user_id <> ' . ANONYMOUS : '') . ' AND u.user_id = s.session_user_id - ORDER BY u.username ASC, s.session_ip ASC'; + ORDER BY u.username_clean ASC, s.session_ip ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 283053ca6d..c00a2cd3d9 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -160,7 +160,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = if ($return_array) { - // Include some more informations... + // Include some more information... $selected = (is_array($select_id)) ? ((in_array($row['forum_id'], $select_id)) ? true : false) : (($row['forum_id'] == $select_id) ? true : false); $forum_list[$row['forum_id']] = array_merge(array('padding' => $padding, 'selected' => $selected), $row); } @@ -471,7 +471,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) sync('forum', 'forum_id', $forum_ids, true); } - // Update posted informations + // Update posted information update_posted_info($topic_ids); } @@ -942,7 +942,7 @@ function delete_topic_shadows($max_age, $forum_id = '', $auto_sync = true) } /** -* Update/Sync posted informations for topics +* Update/Sync posted information for topics */ function update_posted_info(&$topic_ids) { @@ -2144,7 +2144,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id case 'user': $log_type = LOG_USERS; - $sql_forum = 'AND l.reportee_id = ' . intval($user_id); + $sql_forum = 'AND l.reportee_id = ' . (int) $user_id; break; case 'users': @@ -2161,7 +2161,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id return; } - $sql = "SELECT l.*, u.username + $sql = "SELECT l.*, u.username, u.user_colour FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u WHERE l.log_type = $log_type AND u.user_id = l.user_id @@ -2186,10 +2186,15 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id $log[$i] = array( 'id' => $row['log_id'], - 'reportee_id' => $row['reportee_id'], - 'reportee_username' => '', + + 'reportee_id' => $row['reportee_id'], + 'reportee_username' => '', + 'reportee_username_full'=> '', + 'user_id' => $row['user_id'], - 'username' => '' . $row['username'] . '', + 'username' => $row['username'], + 'username_full' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, $profile_url), + 'ip' => $row['log_ip'], 'time' => $row['log_time'], 'forum_id' => $row['forum_id'], @@ -2272,21 +2277,31 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id } } - if ($reportee_id_list) + if (sizeof($reportee_id_list)) { $reportee_id_list = array_unique($reportee_id_list); $reportee_names_list = array(); - if (!function_exists('user_get_id_name')) - { - include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx); - } + $sql = 'SELECT user_id, username, user_colour + FROM ' . USERS_TABLE . ' + WHERE ' . $db->sql_in_set('user_id', $reportee_id_list); + $result = $db->sql_query($sql); - user_get_id_name($reportee_id_list, $reportee_names_list); + while ($row = $db->sql_fetchrow($result)) + { + $reportee_names_list[$row['user_id']] = $row; + } + $db->sql_freeresult($result); foreach ($log as $key => $row) { - $log[$key]['reportee_username'] = (isset($reportee_names_list[$row['reportee_id']])) ? '' . $reportee_names_list[$row['reportee_id']] . '' : false; + if (!isset($reportee_names_list[$row['reportee_id']])) + { + continue; + } + + $log[$key]['reportee_username'] = $reportee_names_list[$row['reportee_id']]['username']; + $log[$key]['reportee_username_full'] = get_username_string('full', $row['reportee_id'], $reportee_names_list[$row['reportee_id']]['username'], $reportee_names_list[$row['reportee_id']]['user_colour'], false, $profile_url); } } @@ -2385,7 +2400,7 @@ function view_warned_users(&$users, &$user_count, $limit = 0, $offset = 0, $limi { global $db; - $sql = 'SELECT user_id, username, user_warnings, user_last_warning + $sql = 'SELECT user_id, username, user_colour, user_warnings, user_last_warning FROM ' . USERS_TABLE . ' WHERE user_warnings > 0 ' . (($limit_days) ? "AND user_last_warning >= $limit_days" : '') . " diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 258652e07c..663b6bfe19 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -712,7 +712,7 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ $extensions = $cache->obtain_attach_extensions(); } - // Look for missing attachment informations... + // Look for missing attachment information... $attach_ids = array(); foreach ($attachment_data as $pos => $attachment) { diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 273a74edef..4625ba47d0 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -987,7 +987,7 @@ class smtp_class { fputs($this->socket, $command . "\r\n"); - (!$private_info) ? $this->add_backtrace("# $command") : $this->add_backtrace('# Ommitting sensitive Informations'); + (!$private_info) ? $this->add_backtrace("# $command") : $this->add_backtrace('# Ommitting sensitive information'); // We could put additional code here } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 37d8c0cd2b..23460c8dec 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -96,8 +96,8 @@ function generate_smilies($mode, $forum_id) } /** -* Update Post Informations (First/Last Post in topic/forum) -* Should be used instead of sync() if only the last post informations are out of sync... faster +* Update Post Information (First/Last Post in topic/forum) +* Should be used instead of sync() if only the last post information are out of sync... faster * * @param string $type Can be forum|topic * @param mixed $ids topic/forum ids @@ -1388,11 +1388,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u $subject = truncate_string($subject); $data['topic_title'] = truncate_string($data['topic_title']); - // Collect some basic informations about which tables and which rows to update/insert + // Collect some basic information about which tables and which rows to update/insert $sql_data = array(); $poster_id = ($mode == 'edit') ? $data['poster_id'] : (int) $user->data['user_id']; - // Collect Informations + // Collect Information switch ($post_mode) { case 'post': diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 685a2964ac..1107f824be 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -120,7 +120,7 @@ function get_folder($user_id, $folder_id = false) $folder = array(); - // Get folder informations + // Get folder information $sql = 'SELECT folder_id, COUNT(msg_id) as num_messages, SUM(pm_unread) as num_unread FROM ' . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id @@ -242,7 +242,7 @@ function clean_sentbox($num_sentbox_messages) } /** -* Check Rule against Message Informations +* Check Rule against Message Information */ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) { @@ -297,7 +297,7 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) $auth2 = new auth(); $auth2->acl($userdata); - if (!$auth2->acl_get('a_') && !$auth->acl_get('m_') && !$auth2->acl_getf_global('m_')) + if (!$auth2->acl_get('a_') && !$auth2->acl_get('m_') && !$auth2->acl_getf_global('m_')) { return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']); } @@ -429,7 +429,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $row['author_in_group'] = $memberships[$row['user_id']]; } - // Check Rule - this should be very quick since we have all informations we need + // Check Rule - this should be very quick since we have all information we need $is_match = false; foreach ($user_rules as $rule_row) { @@ -515,11 +515,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) // Do not change the order of processing // The number of queries needed to be executed here highly depends on the defined rules and are // only gone through if new messages arrive. - $num_not_moved = 0; + $num_not_moved = $num_removed = 0; // Delete messages if (sizeof($delete_ids)) { + $num_removed = sizeof($delete_ids); delete_pm($user_id, $delete_ids, PRIVMSGS_NO_BOX); } @@ -694,7 +695,10 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) $user->data['user_unread_privmsg'] -= $num_unread; } - return $num_not_moved; + return array( + 'not_moved' => $num_not_moved, + 'deleted' => $num_removed, + ); } /** @@ -911,7 +915,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) return false; } - // Get PM Informations for later deleting + // Get PM Information for later deleting $sql = 'SELECT msg_id, pm_unread, pm_new FROM ' . PRIVMSGS_TO_TABLE . ' WHERE ' . $db->sql_in_set('msg_id', array_map('intval', $msg_ids)) . " @@ -952,7 +956,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) $db->sql_query($sql); // Set delete flag for those intended to receive the PM - // We do not remove the message actually, to retain some basic informations (sent time for example) + // We do not remove the message actually, to retain some basic information (sent time for example) $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' SET pm_deleted = 1 WHERE ' . $db->sql_in_set('msg_id', array_keys($delete_rows)); @@ -962,7 +966,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) } else { - // Delete Private Message Informations + // Delete private message data $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . " WHERE user_id = $user_id AND folder_id = $folder_id @@ -1058,7 +1062,7 @@ function rebuild_header($check_ary) } /** -* Print out/assign recipient informations +* Print out/assign recipient information */ function write_pm_addresses($check_ary, $author_id, $plaintext = false) { @@ -1248,11 +1252,11 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr $current_time = time(); - // Collect some basic informations about which tables and which rows to update/insert + // Collect some basic information about which tables and which rows to update/insert $sql_data = array(); $root_level = 0; - // Recipient Informations + // Recipient Information $recipients = $to = $bcc = array(); if ($mode != 'edit') diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a7a76cf526..ff32e4447d 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -9,7 +9,7 @@ */ /** -* Responsible for holding all file relevant informations, as well as doing file-specific operations. +* Responsible for holding all file relevant information, as well as doing file-specific operations. * The {@link fileupload fileupload class} can be used to upload several files, each of them being this object to operate further on. * @package phpBB3 */ diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 0664ab45ec..514cd26d48 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -408,7 +408,7 @@ function user_delete($mode, $user_id, $post_username = false) AND folder_id = ' . PRIVMSGS_NO_BOX; $db->sql_query($sql); - // Delete all to-informations + // Delete all to-information $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . ' WHERE user_id = ' . $user_id; $db->sql_query($sql); @@ -1529,10 +1529,12 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow 'group_receive_pm' => 'int', 'group_legend' => 'int', 'group_message_limit' => 'int', + + 'group_founder_manage' => 'int', ); // Those are group-only attributes - $group_only_ary = array('group_receive_pm', 'group_legend', 'group_message_limit'); + $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) @@ -1719,7 +1721,7 @@ function group_delete($group_id, $group_name = false) /** * Add user(s) to group * -* @return false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' +* @return mixed false if no errors occurred, else the user lang string for the relevant error, for example 'NO_USER' */ function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false) { diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index b277fb0a46..bf9ef5280d 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -114,7 +114,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info) $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, false, $folder_img, $folder_alt, $topic_type); diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index 5c4e39bfc4..acfedb583f 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -134,7 +134,7 @@ function mcp_front_view($id, $mode, $action) $global_id = $forum_list[0]; $sql = $db->sql_build_query('SELECT', array( - 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', + 'SELECT' => 'r.report_time, p.post_id, p.post_subject, u.username, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( REPORTS_TABLE => 'r', @@ -176,11 +176,14 @@ function mcp_front_view($id, $mode, $action) 'U_MCP_TOPIC' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id'] . "&i=$id&mode=topic_view"), 'U_FORUM' => (!$global_topic) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']) : '', 'U_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $row['topic_id']), - 'U_REPORTER' => ($row['user_id'] == ANONYMOUS) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + + 'REPORTER_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'REPORTER' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']), + 'U_REPORTER' => get_username_string('profile', $row['user_id'], $row['username'], $row['user_colour']), 'FORUM_NAME' => (!$global_topic) ? $row['forum_name'] : $user->lang['GLOBAL_ANNOUNCEMENT'], 'TOPIC_TITLE' => $row['topic_title'], - 'REPORTER' => ($row['user_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $row['username'], 'SUBJECT' => ($row['post_subject']) ? $row['post_subject'] : $user->lang['NO_SUBJECT'], 'REPORT_TIME' => $user->format_date($row['report_time'])) ); @@ -218,7 +221,7 @@ function mcp_front_view($id, $mode, $action) foreach ($log as $row) { $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'TIME' => $user->format_date($row['time']), 'ACTION' => $row['action'], diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php index f9cf7d27df..44acc10174 100755 --- a/phpBB/includes/mcp/mcp_logs.php +++ b/phpBB/includes/mcp/mcp_logs.php @@ -102,7 +102,7 @@ class mcp_logs // Sorting $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'u.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -146,7 +146,7 @@ class mcp_logs } $template->assign_block_vars('log', array( - 'USERNAME' => $row['username'], + 'USERNAME' => $row['username_full'], 'IP' => $row['ip'], 'DATE' => $user->format_date($row['time']), 'ACTION' => $row['action'], diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 302ace9755..e681ebab96 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -161,7 +161,7 @@ class mcp_notes $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_IP'], 'd' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('a' => 'u.username', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); + $sort_by_sql = array('a' => 'u.username_clean', 'b' => 'l.log_time', 'c' => 'l.log_ip', 'd' => 'l.log_operation'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -181,7 +181,7 @@ class mcp_notes foreach ($log_data as $row) { $template->assign_block_vars('usernotes', array( - 'REPORT_BY' => $row['username'], + 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => $user->format_date($row['time']), 'ACTION' => $row['action'], 'IP' => $row['ip'], diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 21ca7c11c3..b2b0ceb419 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -159,7 +159,7 @@ function mcp_post_details($id, $mode, $action) foreach ($log_data as $row) { $template->assign_block_vars('usernotes', array( - 'REPORT_BY' => $row['username'], + 'REPORT_BY' => $row['username_full'], 'REPORT_AT' => $user->format_date($row['time']), 'ACTION' => $row['action'], 'ID' => $row['id']) diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 0b5f29a4f6..709d685e88 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -64,7 +64,7 @@ class mcp_reports // closed reports are accessed by report id $report_id = request_var('r', 0); - $sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username + $sql = 'SELECT r.post_id, r.user_id, r.report_closed, report_time, r.report_text, rr.reason_title, rr.reason_description, u.username, u.user_colour FROM ' . REPORTS_TABLE . ' r, ' . REPORTS_REASONS_TABLE . ' rr, ' . USERS_TABLE . ' u WHERE ' . (($report_id) ? 'r.report_id = ' . $report_id : "r.post_id = $post_id AND r.report_closed = 0") . ' AND rr.reason_id = r.reason_id @@ -136,7 +136,6 @@ class mcp_reports 'U_MCP_WARN_REPORTER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $report['user_id']) : '', 'U_MCP_WARN_USER' => ($auth->acl_getf_global('m_warn')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user&u=' . $post_info['user_id']) : '', 'U_VIEW_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&p=' . $post_info['post_id'] . '#p' . $post_info['post_id']), - 'U_VIEW_REPORTER_PROFILE' => ($report['user_id'] != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $report['user_id']) : '', 'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']), 'EDIT_IMG' => $user->img('icon_post_edit', $user->lang['EDIT_POST']), @@ -146,7 +145,6 @@ class mcp_reports 'REPORTED_IMG' => $user->img('icon_topic_reported', $user->lang['POST_REPORTED']), 'REPORT_REASON_TITLE' => $reason['title'], 'REPORT_REASON_DESCRIPTION' => $reason['description'], - 'REPORTER_NAME' => ($report['user_id'] == ANONYMOUS) ? $user->lang['GUEST'] : $report['username'], 'REPORT_DATE' => $user->format_date($report['report_time']), 'REPORT_TEXT' => $report['report_text'], @@ -155,6 +153,11 @@ class mcp_reports 'POST_AUTHOR' => get_username_string('username', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), 'U_POST_AUTHOR' => get_username_string('profile', $post_info['user_id'], $post_info['username'], $post_info['user_colour'], $post_info['post_username']), + 'REPORTER_FULL' => get_username_string('full', $report['user_id'], $report['username'], $report['user_colour']), + 'REPORTER_COLOUR' => get_username_string('colour', $report['user_id'], $report['username'], $report['user_colour']), + 'REPORTER_NAME' => get_username_string('username', $report['user_id'], $report['username'], $report['user_colour']), + 'U_VIEW_REPORTER_PROFILE' => get_username_string('profile', $report['user_id'], $report['username'], $report['user_colour']), + 'POST_PREVIEW' => $message, 'POST_SUBJECT' => $post_info['post_subject'], 'POST_DATE' => $user->format_date($post_info['post_time']), diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index da76dc8b58..4206582d01 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -88,9 +88,12 @@ function mcp_warn_front_view($id, $mode) { $template->assign_block_vars('highest', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNINGS' => $row['user_warnings'], ) @@ -99,7 +102,7 @@ function mcp_warn_front_view($id, $mode) // And now the 5 most recent users to get in trouble - $sql = 'SELECT u.user_id, u.username, u.user_warnings, w.warning_time + $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_warnings, w.warning_time FROM ' . USERS_TABLE . ' u, ' . WARNINGS_TABLE . ' w WHERE u.user_id = w.user_id ORDER BY w.warning_time DESC'; @@ -109,9 +112,12 @@ function mcp_warn_front_view($id, $mode) { $template->assign_block_vars('latest', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['warning_time']), 'WARNINGS' => $row['user_warnings'], ) @@ -137,7 +143,7 @@ function mcp_warn_list_view($id, $mode, $action) $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_DATE'], 'c' => $user->lang['SORT_WARNINGS']); - $sort_by_sql = array('a' => 'username', 'b' => 'user_last_warning', 'c' => 'user_warnings'); + $sort_by_sql = array('a' => 'username_clean', 'b' => 'user_last_warning', 'c' => 'user_warnings'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $st, $sk, $sd, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); @@ -155,9 +161,12 @@ function mcp_warn_list_view($id, $mode, $action) { $template->assign_block_vars('user', array( 'U_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $row['user_id']), - 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), - 'USERNAME' => $row['username'], + 'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']), + 'USERNAME' => $row['username'], + 'USERNAME_COLOUR' => ($row['user_colour']) ? '#' . $row['user_colour'] : '', + 'U_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['user_id']), + 'WARNING_TIME' => $user->format_date($row['user_last_warning']), 'WARNINGS' => $row['user_warnings'], ) diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 7882b7dc05..ad6a049a65 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -140,7 +140,7 @@ class session { global $phpEx, $SID, $_SID, $db, $config, $phpbb_root_path; - // Give us some basic informations + // Give us some basic information $this->time_now = time(); $this->cookie_data = array('u' => 0, 'k' => ''); $this->update_session_page = $update_session_page; diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index d7630765e7..57a8d0f86a 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -418,7 +418,7 @@ class ucp_main $topic_id = $row['topic_moved_id']; } - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); @@ -579,7 +579,7 @@ class ucp_main $replies = ($auth->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies']; - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; $unread_topic = false; diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index c7c77836d4..b51f265df3 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -240,10 +240,11 @@ class ucp_pm } // If new messages arrived, place them into the appropiate folder - $num_not_moved = 0; + $num_not_moved = $num_removed = 0; + if ($user->data['user_new_privmsg'] && $action == 'view_folder') { - place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); + $return = place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); $num_not_moved = $user->data['user_new_privmsg']; // Make sure num_not_moved is valid. @@ -256,6 +257,9 @@ class ucp_pm $num_not_moved = $user->data['user_new_privmsg'] = $user->data['user_unread_privmsg'] = 0; } + + // Assign the number of private messages being removed due to rules. + $num_removed = $return['deleted']; } if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX) @@ -350,8 +354,10 @@ class ucp_pm 'CUR_FOLDER_ID' => $folder_id, 'CUR_FOLDER_NAME' => $folder_status['folder_name'], 'NUM_NOT_MOVED' => $num_not_moved, + 'NUM_REMOVED' => $num_removed, 'RELEASE_MESSAGE_INFO' => sprintf($user->lang['RELEASE_MESSAGES'], '', ''), 'NOT_MOVED_MESSAGES' => ($num_not_moved == 1) ? $user->lang['NOT_MOVED_MESSAGE'] : sprintf($user->lang['NOT_MOVED_MESSAGES'], $num_not_moved), + 'RULE_REMOVED_MESSAGES' => ($num_removed == 1) ? $user->lang['RULE_REMOVED_MESSAGE'] : sprintf($user->lang['RULE_REMOVED_MESSAGES'], $num_removed), 'S_FOLDER_OPTIONS' => $s_folder_options, 'S_TO_FOLDER_OPTIONS' => $s_to_folder_options, diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index acfa1758b8..4277639d83 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -163,7 +163,7 @@ function view_folder($id, $mode, $folder_id, $folder) { foreach ($id_ary as $ug_id => $_id) { - $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : ''; + $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="font-weight: bold; color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : ''; if ($type == 'u') { @@ -440,7 +440,7 @@ function get_pm_from($folder_id, $folder, $user_id) // PM ordering options $limit_days = array(0 => $user->lang['ALL_MESSAGES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 't' => 'p.message_time', 's' => 'p.message_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.message_time', 's' => 'p.message_subject'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param); diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 25dfac4807..cc23fc0fce 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -49,7 +49,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Assign TO/BCC Addresses to template write_pm_addresses(array('to' => $message_row['to_address'], 'bcc' => $message_row['bcc_address']), $author_id); - $user_info = get_user_informations($author_id, $message_row); + $user_info = get_user_information($author_id, $message_row); // Parse the message and subject $message = $message_row['message_text']; @@ -376,9 +376,9 @@ function message_history($msg_id, $user_id, $message_row, $folder) } /** -* Get User Informations (only for message display) +* Get user information (only for message display) */ -function get_user_informations($user_id, $user_row) +function get_user_information($user_id, $user_row) { global $db, $auth, $user, $cache; global $phpbb_root_path, $phpEx, $config; diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 2c6d9b79af..c085e54143 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -31,7 +31,7 @@ class ucp_prefs $data = array( 'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']), - 'dateformat' => request_var('dateformat', $user->data['user_dateformat']), + 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), 'lang' => request_var('lang', $user->data['user_lang']), 'style' => request_var('style', (int) $user->data['user_style']), 'tz' => request_var('tz', (float) $user->data['user_timezone']), diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 7994acdc85..fcbc2675f8 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -100,13 +100,22 @@ class ucp_register return; } - // Try to manually determine the timezone + // Try to manually determine the timezone and adjust the dst if the server date/time complies with the default setting +/- 1 $timezone = date('Z') / 3600; $is_dst = date('I'); - $timezone = ($is_dst) ? $timezone - 1 : $timezone; - if (!isset($user->lang['tz_zones'][(string) $timezone])) + if ($config['board_timezone'] == $timezone || $config['board_timezone'] == ($timezone - 1)) { + $timezone = ($is_dst) ? $timezone - 1 : $timezone; + + if (!isset($user->lang['tz_zones'][(string) $timezone])) + { + $timezone = $config['board_timezone']; + } + } + else + { + $is_dst = $config['board_dst']; $timezone = $config['board_timezone']; } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index 2548037b10..b65ba2fd29 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -202,7 +202,7 @@ class ucp_zebra WHERE z.user_id = ' . $user->data['user_id'] . " AND $sql_and AND u.user_id = z.zebra_id - ORDER BY u.username ASC"; + ORDER BY u.username_clean ASC"; $result = $db->sql_query($sql); $s_username_options = ''; diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 6c03697e52..25ed12b824 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -289,13 +289,19 @@ $database_update_info = array( BBCODES_TABLE => array( 'bbcode_helpline' => array('VCHAR_UNI', ''), ), - ), - /* Add the following columns - 'add_columns' => array( - {table} => array( - {column_name} => array('USINT', 0), -> column type + USERS_TABLE => array( + 'user_occ' => array('TEXT_UNI', ''), ), - ),*/ + CONFIG_TABLE => array( + 'config_value' => array('VCHAR_UNI', ''), + ), + ), + // Add the following columns + 'add_columns' => array( + GROUPS_TABLE => array( + 'group_founder_manage' => array('BOOL', 0), + ), + ), ), // Latest version '3.0.b4-dev' => array(), @@ -448,13 +454,26 @@ $errored = $no_updates = false; flush(); +// some code magic switch ($current_version) { case '3.0.b3': -/* - some code magic -*/ - // No need to change here, before no break should appear + // Set group_founder_manage for administrators group + $sql = 'SELECT group_id + FROM ' . GROUPS_TABLE . " + WHERE group_name = 'ADMINISTRATORS' + AND group_type = " . GROUP_SPECIAL; + $result = $db->sql_query($sql); + $group_id = (int) $db->sql_fetchfield('group_id'); + $db->sql_freeresult($result); + + if ($group_id) + { + $sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_founder_manage = 1 WHERE group_id = ' . $group_id; + _sql($sql, $errored, $error_ary); + } + + // No need to change here. Before this line, no break should appear break; case '3.0.b4-dev': @@ -628,7 +647,7 @@ function column_exists($dbms, $table, $column_name) } /** -* Function to prepare some column informations for better usage +* Function to prepare some column information for better usage */ function prepare_column_data($dbms, $column_data) { diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 472b79cfa7..8d06564e3c 100755 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -2065,12 +2065,92 @@ class install_install extends module /** * A list of the web-crawlers/bots we recognise by default + * + * Candidates but not included: + * 'Accoona [Bot]' 'Accoona-AI-Agent/' + * 'ASPseek [Crawler]' 'ASPseek/' + * 'Boitho [Crawler]' 'boitho.com-dc/' + * 'Bunnybot [Bot]' 'powered by www.buncat.de' + * 'Cosmix [Bot]' 'cfetch/' + * 'Crawler Search [Crawler]' '.Crawler-Search.de' + * 'Findexa [Crawler]' 'Findexa Crawler (' + * 'GBSpider [Spider]' 'GBSpider v' + * 'genie [Bot]' 'genieBot (' + * 'Hogsearch [Bot]' 'oegp v. 1.3.0' + * 'Insuranco [Bot]' 'InsurancoBot' + * 'IRLbot [Bot]' 'http://irl.cs.tamu.edu/crawler' + * 'ISC Systems [Bot]' 'ISC Systems iRc Search' + * 'Jyxobot [Bot]' 'Jyxobot/' + * 'Kraehe [Metasuche]' '-DIE-KRAEHE- META-SEARCH-ENGINE/' + * 'LinkWalker' 'LinkWalker' + * 'MMSBot [Bot]' 'http://www.mmsweb.at/bot.html' + * 'Naver [Bot]' 'nhnbot@naver.com)' + * 'NetResearchServer' 'NetResearchServer/' + * 'Nimble [Crawler]' 'NimbleCrawler' + * 'Ocelli [Bot]' 'Ocelli/' + * 'Onsearch [Bot]' 'onCHECK-Robot' + * 'Orange [Spider]' 'OrangeSpider' + * 'Sproose [Bot]' 'http://www.sproose.com/bot' + * 'Susie [Sync]' '!Susie (http://www.sync2it.com/susie)' + * 'Tbot [Bot]' 'Tbot/' + * 'Thumbshots [Capture]' 'thumbshots-de-Bot' + * 'Vagabondo [Crawler]' 'http://webagent.wise-guys.nl/' + * 'Walhello [Bot]' 'appie 1.1 (www.walhello.com)' + * 'WissenOnline [Bot]' 'WissenOnline-Bot' + * 'WWWeasel [Bot]' 'WWWeasel Robot v' + * 'Xaldon [Spider]' 'Xaldon WebSpider' */ var $bot_list = array( - 'Alexa' => array('ia_archiver', '66.28.250.,209.237.238.'), - 'Fastcrawler' => array('FAST MetaWeb Crawler', '66.151.181.'), - 'Googlebot' => array('Googlebot/', ''), - 'Inktomi' => array('Slurp/', '216.35.116.,66.196.'), + 'AdsBot [Google]' => array('AdsBot-Google', ''), + 'Alexa [Bot]' => array('ia_archiver', ''), + 'Alta Vista [Bot]' => array('Scooter/', ''), + 'Ask Jeeves [Bot]' => array('Ask Jeeves', ''), + 'Baidu [Spider]' => array('Baiduspider+(', ''), + 'Exabot [Bot]' => array('Exabot/', ''), + 'FAST Enterprise [Crawler]' => array('FAST Enterprise Crawler', ''), + 'FAST WebCrawler [Crawler]' => array('FAST-WebCrawler/', ''), + 'Francis [Bot]' => array('http://www.neomo.de/', ''), + 'Gigabot [Bot]' => array('Gigabot/', ''), + 'Google Adsense [Bot]' => array('Mediapartners-Google/', ''), + 'Google Desktop' => array('Google Desktop', ''), + 'Google Feedfetcher' => array('Feedfetcher-Google', ''), + 'Google [Bot]' => array('Googlebot', ''), + 'Heise IT-Markt [Crawler]' => array('heise-IT-Markt-Crawler', ''), + 'Heritrix [Crawler]' => array('heritrix/1.', ''), + 'IBM Research [Bot]' => array('ibm.com/cs/crawler', ''), + 'ICCrawler - ICjobs' => array('ICCrawler - ICjobs', ''), + 'ichiro [Crawler]' => array('ichiro/2', ''), + 'Majestic-12 [Bot]' => array('MJ12bot/', ''), + 'Metager [Bot]' => array('MetagerBot/', ''), + 'MSN NewsBlogs' => array('msnbot-NewsBlogs/', ''), + 'MSN [Bot]' => array('msnbot/', ''), + 'MSNbot Media' => array('msnbot-media/', ''), + 'NG-Search [Bot]' => array('NG-Search/', ''), + 'Nutch [Bot]' => array('http://lucene.apache.org/nutch/', ''), + 'Nutch/CVS [Bot]' => array('NutchCVS/', ''), + 'OmniExplorer [Bot]' => array('OmniExplorer_Bot/', ''), + 'Online link [Validator]' => array('online link validator', ''), + 'psbot [Picsearch]' => array('psbot/0', ''), + 'Seekport [Bot]' => array('Seekbot/', ''), + 'Sensis [Crawler]' => array('Sensis Web Crawler', ''), + 'SEO Crawler' => array('SEO search Crawler/', ''), + 'Seoma [Crawler]' => array('Seoma [SEO Crawler]', ''), + 'SEOSearch [Crawler]' => array('SEOsearch/', ''), + 'Snappy [Bot]' => array('Snappy/1.1 ( http://www.urltrends.com/ )', ''), + 'Steeler [Crawler]' => array('http://www.tkl.iis.u-tokyo.ac.jp/~crawler/', ''), + 'Synoo [Bot]' => array('SynooBot/', ''), + 'Telekom [Bot]' => array('crawleradmin.t-info@telekom.de', ''), + 'TurnitinBot [Bot]' => array('TurnitinBot/', ''), + 'Voyager [Bot]' => array('voyager/1.0', ''), + 'W3 [Sitesearch]' => array('W3 SiteSearch Crawler', ''), + 'W3C [Linkcheck]' => array('W3C-checklink/', ''), + 'W3C [Validator]' => array('W3C_*Validator', ''), + 'WiseNut [Bot]' => array('http://www.WISEnutbot.com', ''), + 'Yacy [Bot]' => array('yacybot', ''), + 'Yahoo MMCrawler [Bot]' => array('Yahoo-MMCrawler/', ''), + 'Yahoo Slurp [Bot]' => array('Yahoo! DE Slurp', ''), + 'Yahoo [Bot]' => array('Yahoo! Slurp', ''), + 'YahooSeeker [Bot]' => array('YahooSeeker/', ''), ); /** diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index ae5ae11223..82ee374e52 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -802,7 +802,7 @@ class install_update extends module return $update_list; } - // Now diff the remaining files to get informations about their status (not modified/modified/up-to-date) + // Now diff the remaining files to get information about their status (not modified/modified/up-to-date) // not modified? foreach ($this->update_info['files'] as $index => $file) @@ -960,7 +960,7 @@ class install_update extends module if ($info !== false) { - // Adjust the update info file to hold some specific style-related informations + // Adjust the update info file to hold some specific style-related information $info['custom'] = array(); // Get custom installed styles... diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index a79b33ee45..b98be18e04 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -213,7 +213,7 @@ END;; # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, - config_value VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, + config_value VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, is_dynamic INTEGER DEFAULT 0 NOT NULL );; @@ -422,6 +422,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch(notify_status) CREATE TABLE phpbb_groups ( group_id INTEGER NOT NULL, group_type INTEGER DEFAULT 1 NOT NULL, + group_founder_manage INTEGER DEFAULT 0 NOT NULL, group_name VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, group_desc BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, group_desc_bitfield VARCHAR(255) CHARACTER SET NONE DEFAULT '' NOT NULL, @@ -1422,7 +1423,7 @@ CREATE TABLE phpbb_users ( user_msnm VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_jabber VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, user_website VARCHAR(200) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, - user_occ VARCHAR(255) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE, + user_occ BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_interests BLOB SUB_TYPE TEXT CHARACTER SET UTF8 DEFAULT '' NOT NULL, user_actkey VARCHAR(32) CHARACTER SET NONE DEFAULT '' NOT NULL, user_newpasswd VARCHAR(32) CHARACTER SET UTF8 DEFAULT '' NOT NULL COLLATE UNICODE diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index b058a7c86d..73f2d4546c 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -518,6 +518,7 @@ GO CREATE TABLE [phpbb_groups] ( [group_id] [int] IDENTITY (1, 1) NOT NULL , [group_type] [int] DEFAULT (1) NOT NULL , + [group_founder_manage] [int] DEFAULT (0) NOT NULL , [group_name] [varchar] (255) DEFAULT ('') NOT NULL , [group_desc] [varchar] (4000) DEFAULT ('') NOT NULL , [group_desc_bitfield] [varchar] (255) DEFAULT ('') NOT NULL , @@ -1664,7 +1665,7 @@ CREATE TABLE [phpbb_users] ( [user_msnm] [varchar] (255) DEFAULT ('') NOT NULL , [user_jabber] [varchar] (255) DEFAULT ('') NOT NULL , [user_website] [varchar] (200) DEFAULT ('') NOT NULL , - [user_occ] [varchar] (255) DEFAULT ('') NOT NULL , + [user_occ] [varchar] (4000) DEFAULT ('') NOT NULL , [user_interests] [varchar] (4000) DEFAULT ('') NOT NULL , [user_actkey] [varchar] (32) DEFAULT ('') NOT NULL , [user_newpasswd] [varchar] (32) DEFAULT ('') NOT NULL diff --git a/phpBB/install/schemas/mysql_40_schema.sql b/phpBB/install/schemas/mysql_40_schema.sql index 0b646af48f..d7d77b07e9 100644 --- a/phpBB/install/schemas/mysql_40_schema.sql +++ b/phpBB/install/schemas/mysql_40_schema.sql @@ -150,7 +150,7 @@ CREATE TABLE phpbb_bots ( # Table: 'phpbb_config' CREATE TABLE phpbb_config ( config_name varchar(255) DEFAULT '' NOT NULL, - config_value varchar(255) DEFAULT '' NOT NULL, + config_value text NOT NULL, is_dynamic tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, PRIMARY KEY (config_name), KEY is_dynamic (is_dynamic) @@ -295,6 +295,7 @@ CREATE TABLE phpbb_forums_watch ( CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, + group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name text NOT NULL, group_desc text NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/mysql_41_schema.sql b/phpBB/install/schemas/mysql_41_schema.sql index 1b0288359d..575cc14244 100644 --- a/phpBB/install/schemas/mysql_41_schema.sql +++ b/phpBB/install/schemas/mysql_41_schema.sql @@ -295,6 +295,7 @@ CREATE TABLE phpbb_forums_watch ( CREATE TABLE phpbb_groups ( group_id mediumint(8) UNSIGNED NOT NULL auto_increment, group_type tinyint(4) DEFAULT '1' NOT NULL, + group_founder_manage tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, group_name varchar(255) DEFAULT '' NOT NULL, group_desc text NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, @@ -1024,7 +1025,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, - user_occ varchar(255) DEFAULT '' NOT NULL, + user_occ text NOT NULL, user_interests text NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index c73b82b45b..11a2ca2329 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -320,7 +320,7 @@ END; */ CREATE TABLE phpbb_config ( config_name varchar2(255) DEFAULT '' , - config_value varchar2(255) DEFAULT '' , + config_value varchar2(765) DEFAULT '' , is_dynamic number(1) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_config PRIMARY KEY (config_name) ) @@ -583,6 +583,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status CREATE TABLE phpbb_groups ( group_id number(8) NOT NULL, group_type number(4) DEFAULT '1' NOT NULL, + group_founder_manage number(1) DEFAULT '0' NOT NULL, group_name varchar2(255) DEFAULT '' , group_desc clob DEFAULT '' , group_desc_bitfield varchar2(255) DEFAULT '' , @@ -1833,7 +1834,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar2(765) DEFAULT '' , user_jabber varchar2(765) DEFAULT '' , user_website varchar2(600) DEFAULT '' , - user_occ varchar2(765) DEFAULT '' , + user_occ clob DEFAULT '' , user_interests clob DEFAULT '' , user_actkey varchar2(32) DEFAULT '' , user_newpasswd varchar2(96) DEFAULT '' , diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 11a0a7a958..554742b7e4 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -437,6 +437,7 @@ CREATE SEQUENCE phpbb_groups_seq; CREATE TABLE phpbb_groups ( group_id INT4 DEFAULT nextval('phpbb_groups_seq'), group_type INT2 DEFAULT '1' NOT NULL, + group_founder_manage INT2 DEFAULT '0' NOT NULL CHECK (group_founder_manage >= 0), group_name varchar_ci DEFAULT '' NOT NULL, group_desc varchar(4000) DEFAULT '' NOT NULL, group_desc_bitfield varchar(255) DEFAULT '' NOT NULL, @@ -1284,7 +1285,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) DEFAULT '' NOT NULL, user_jabber varchar(255) DEFAULT '' NOT NULL, user_website varchar(200) DEFAULT '' NOT NULL, - user_occ varchar(255) DEFAULT '' NOT NULL, + user_occ varchar(4000) DEFAULT '' NOT NULL, user_interests varchar(4000) DEFAULT '' NOT NULL, user_actkey varchar(32) DEFAULT '' NOT NULL, user_newpasswd varchar(32) DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 49d7564656..02bd26b506 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -397,12 +397,12 @@ INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_reg INSERT INTO phpbb_users (user_type, group_id, username, username_clean, user_regdate, user_password, user_email, user_lang, user_style, user_rank, user_colour, user_posts, user_permissions, user_ip, user_birthday, user_lastpage, user_last_confirm_key, user_post_sortby_type, user_post_sortby_dir, user_topic_sortby_type, user_topic_sortby_dir, user_avatar, user_sig, user_sig_bbcode_uid, user_from, user_icq, user_aim, user_yim, user_msnm, user_jabber, user_website, user_occ, user_interests, user_actkey, user_newpasswd) VALUES (3, 5, 'Admin', 'admin', 0, '21232f297a57a5a743894a0e4a801fc3', 'admin@yourdomain.com', 'en', 1, 1, 'AA0000', 1, '', '', '', '', '', 't', 'a', 't', 'd', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); # -- Groups -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 3, '', 0, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 3, '00AA00', 1, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 3, 'AA0000', 1, '', '', ''); -INSERT INTO phpbb_groups (group_name, group_type, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 3, '9E8DA7', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GUESTS', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('REGISTERED_COPPA', 3, 0, '', 0, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('GLOBAL_MODERATORS', 3, 0, '00AA00', 1, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('ADMINISTRATORS', 3, 1, 'AA0000', 1, '', '', ''); +INSERT INTO phpbb_groups (group_name, group_type, group_founder_manage, group_colour, group_legend, group_avatar, group_desc, group_desc_uid) VALUES ('BOTS', 3, 0, '9E8DA7', 0, '', '', ''); # -- User -> Group INSERT INTO phpbb_user_group (group_id, user_id, user_pending, group_leader) VALUES (1, 1, 0, 0); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 916c9bb5e6..563cc949e9 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -287,6 +287,7 @@ CREATE INDEX phpbb_forums_watch_notify_stat ON phpbb_forums_watch (notify_status CREATE TABLE phpbb_groups ( group_id INTEGER PRIMARY KEY NOT NULL , group_type tinyint(4) NOT NULL DEFAULT '1', + group_founder_manage INTEGER UNSIGNED NOT NULL DEFAULT '0', group_name varchar(255) NOT NULL DEFAULT '', group_desc text(65535) NOT NULL DEFAULT '', group_desc_bitfield varchar(255) NOT NULL DEFAULT '', @@ -995,7 +996,7 @@ CREATE TABLE phpbb_users ( user_msnm varchar(255) NOT NULL DEFAULT '', user_jabber varchar(255) NOT NULL DEFAULT '', user_website varchar(200) NOT NULL DEFAULT '', - user_occ varchar(255) NOT NULL DEFAULT '', + user_occ text(65535) NOT NULL DEFAULT '', user_interests text(65535) NOT NULL DEFAULT '', user_actkey varchar(32) NOT NULL DEFAULT '', user_newpasswd varchar(32) NOT NULL DEFAULT '' diff --git a/phpBB/language/en/acp/groups.php b/phpBB/language/en/acp/groups.php index 06f1301e4b..4d4f08c9b3 100644 --- a/phpBB/language/en/acp/groups.php +++ b/phpBB/language/en/acp/groups.php @@ -59,6 +59,8 @@ $lang = array_merge($lang, array( 'GROUP_DST' => 'Group daylight savings', '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_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 d7e4cbd50e..5bba8f92e6 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -311,6 +311,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_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/install.php b/phpBB/language/en/install.php index e19f985266..85b46dea4e 100755 --- a/phpBB/language/en/install.php +++ b/phpBB/language/en/install.php @@ -325,7 +325,7 @@ $lang = array_merge($lang, array( 'ERROR' => 'Error', 'FILE_ALREADY_UP_TO_DATE' => 'File is already up to date', - 'FILE_USED' => 'Informations used from', + 'FILE_USED' => 'Information used from', // Single file 'FILES_CONFLICT' => 'Conflict files', 'FILES_CONFLICT_EXPLAIN' => 'The following files are modified and do not represent the original files from the old version. phpBB determined that these files create conflicts if they are tried to be merged. Please investigate the conflicts and try to manually resolve them or continue the update choosing the preferred merging method. If you resolve the conflicts manually check the files again after you modified the them. You are also able to choose between the preferred merge method for every file. The first one will result in a file where the conflicting lines from your old file will be lost, the other one will result in loosing the changes from the newer file.', 'FILES_MODIFIED' => 'Modified files', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 6de6eca459..4761fcdd48 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -368,6 +368,8 @@ $lang = array_merge($lang, array( 'RULE_ALREADY_DEFINED' => 'This rule was defined previously', 'RULE_DELETED' => 'Rule successfully removed', 'RULE_NOT_DEFINED' => 'Rule not correctly specified', + 'RULE_REMOVED_MESSAGE' => 'One private message had been removed due to private message filters.', + 'RULE_REMOVED_MESSAGES' => '%d private messages were removed due to private message filters.', 'SAME_PASSWORD_ERROR' => 'The new password you entered is the same as your current password', 'SEARCH_YOUR_POSTS' => 'Show your posts', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index 47a2b603fe..98a59a73ed 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -557,21 +557,21 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, case 'posts': $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 't' => 'p.post_time', 's' => 'p.post_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject'); $limit_time_sql = ($min_time) ? "AND p.post_time >= $min_time" : ''; break; case 'reports': $limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 'r' => $user->lang['REPORTER'], 'p' => $user->lang['POST_TIME'], 't' => $user->lang['REPORT_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_sql = array('a' => 'u.username', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject'); + $sort_by_sql = array('a' => 'u.username_clean', 'r' => 'ru.username', 'p' => 'p.post_time', 't' => 'r.report_time', 's' => 'p.post_subject'); break; case 'logs': $limit_days = array(0 => $user->lang['ALL_ENTRIES'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('u' => $user->lang['SORT_USERNAME'], 't' => $user->lang['SORT_DATE'], 'i' => $user->lang['SORT_IP'], 'o' => $user->lang['SORT_ACTION']); - $sort_by_sql = array('u' => 'l.username', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); + $sort_by_sql = array('u' => 'u.username_clean', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $limit_time_sql = ($min_time) ? "AND l.log_time >= $min_time" : ''; break; } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 6231910509..cfea2f9eab 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -139,7 +139,7 @@ switch ($mode) 'WHERE' => $db->sql_in_set('u.user_id', array_unique(array_merge($admin_id_ary, $mod_id_ary))) . ' AND u.group_id = g.group_id', - 'ORDER_BY' => 'g.group_name ASC, u.username ASC' + 'ORDER_BY' => 'g.group_name ASC, u.username_clean ASC' )); $result = $db->sql_query($sql); @@ -846,7 +846,7 @@ switch ($mode) } $sort_key_text['m'] = $user->lang['SORT_RANK']; - $sort_key_sql = array('a' => 'u.username', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); + $sort_key_sql = array('a' => 'u.username_clean', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber'); if ($auth->acl_get('u_viewonline')) { diff --git a/phpBB/search.php b/phpBB/search.php index 47f6b9672d..3dfc4e312c 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -240,7 +240,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // define some variables needed for retrieving post_id/topic_id information - $sort_by_sql = array('a' => 'u.username', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title')); + $sort_by_sql = array('a' => 'u.username_clean', 't' => (($show_results == 'posts') ? 'p.post_time' : 't.topic_last_post_time'), 'f' => 'f.forum_id', 'i' => 't.topic_title', 's' => (($show_results == 'posts') ? 'p.post_subject' : 't.topic_title')); // pre-made searches $sql = $field = ''; @@ -568,7 +568,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } $db->sql_freeresult($result); - // If we have some shadow topics, update the rowset to reflect their topic informations + // If we have some shadow topics, update the rowset to reflect their topic information if (sizeof($shadow_topic_list)) { $sql = 'SELECT * diff --git a/phpBB/styles/subSilver/template/mcp_front.html b/phpBB/styles/subSilver/template/mcp_front.html index 19da75df3c..41fbb19a3a 100644 --- a/phpBB/styles/subSilver/template/mcp_front.html +++ b/phpBB/styles/subSilver/template/mcp_front.html @@ -52,7 +52,7 @@ {report.FORUM_NAME}{report.FORUM_NAME}
[ {L_MODERATE} ] {report.TOPIC_TITLE}
[ {L_MODERATE} ] {report.SUBJECT}
[ {L_VIEW_DETAILS} ] - {report.REPORTER}{report.REPORTER} + {report.REPORTER_FULL} {report.REPORT_TIME} diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html index fbb80100f2..a86aacf006 100644 --- a/phpBB/styles/subSilver/template/mcp_post.html +++ b/phpBB/styles/subSilver/template/mcp_post.html @@ -13,7 +13,7 @@ {L_REPORTER}: - {REPORTER_NAME}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ] + style="font-weight: bold; color: {REPORTER_COLOUR};">{REPORTER_NAME}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ] {L_REPORTED}: @@ -53,7 +53,7 @@ {L_POSTER}: - style="color: {POST_AUTHOR_COLOUR}">{POST_AUTHOR}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ] + style="font-weight: bold; color: {POST_AUTHOR_COLOUR}">{POST_AUTHOR}   [ {L_READ_PROFILE} | {L_VIEW_NOTES} | {L_WARN_USER} ] diff --git a/phpBB/styles/subSilver/template/mcp_warn_front.html b/phpBB/styles/subSilver/template/mcp_warn_front.html index 10897d5b7a..c77f1c8644 100755 --- a/phpBB/styles/subSilver/template/mcp_warn_front.html +++ b/phpBB/styles/subSilver/template/mcp_warn_front.html @@ -31,7 +31,7 @@ - {highest.USERNAME} + {highest.USERNAME_FULL} {highest.WARNINGS} {highest.WARNING_TIME} {L_VIEW_NOTES} @@ -57,7 +57,7 @@ - {latest.USERNAME} + {latest.USERNAME_FULL} {latest.WARNING_TIME} {latest.WARNINGS} {L_VIEW_NOTES} diff --git a/phpBB/styles/subSilver/template/mcp_warn_list.html b/phpBB/styles/subSilver/template/mcp_warn_list.html index f3ff9d4490..5beb502b76 100755 --- a/phpBB/styles/subSilver/template/mcp_warn_list.html +++ b/phpBB/styles/subSilver/template/mcp_warn_list.html @@ -14,7 +14,7 @@ - {user.USERNAME} + {user.USERNAME_FULL} {user.WARNINGS} {user.WARNING_TIME} {L_VIEW_NOTES} diff --git a/phpBB/styles/subSilver/template/posting_topic_review.html b/phpBB/styles/subSilver/template/posting_topic_review.html index d54d581003..1b5e192856 100644 --- a/phpBB/styles/subSilver/template/posting_topic_review.html +++ b/phpBB/styles/subSilver/template/posting_topic_review.html @@ -18,7 +18,7 @@ - +
diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html index 4b65ab225d..f07420a454 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html @@ -38,9 +38,17 @@ - + - + diff --git a/phpBB/ucp.php b/phpBB/ucp.php index 397ab50847..d1461c1764 100755 --- a/phpBB/ucp.php +++ b/phpBB/ucp.php @@ -264,7 +264,7 @@ $sql = $db->sql_build_query('SELECT_DISTINCT', array( 'GROUP_BY' => 'z.zebra_id, u.user_id, u.username, u.user_allow_viewonline, u.user_colour', - 'ORDER_BY' => 'u.username ASC', + 'ORDER_BY' => 'u.username_clean ASC', )); $result = $db->sql_query($sql); diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 989a30b6c8..cd938313cf 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -429,7 +429,7 @@ if ($num_rows < $sql_limit) $db->sql_freeresult($result); } -// If we have some shadow topics, update the rowset to reflect their topic informations +// If we have some shadow topics, update the rowset to reflect their topic information if (sizeof($shadow_topic_list)) { $sql = 'SELECT * @@ -531,7 +531,7 @@ if (sizeof($topic_list)) $unread_topic = (isset($topic_tracking_info[$topic_id]) && $row['topic_last_post_time'] > $topic_tracking_info[$topic_id]) ? true : false; } - // Get folder img, topic status/type related informations + // Get folder img, topic status/type related information $folder_img = $folder_alt = $topic_type = ''; topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type); diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php index f38073a80b..8d5f73f0ef 100644 --- a/phpBB/viewonline.php +++ b/phpBB/viewonline.php @@ -30,7 +30,7 @@ $sort_dir = request_var('sd', 'd'); $show_guests= ($config['load_online_guests']) ? request_var('sg', 0) : 0; $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED']); -$sort_key_sql = array('a' => 'u.username', 'b' => 's.session_time', 'c' => 's.session_page'); +$sort_key_sql = array('a' => 'u.username_clean', 'b' => 's.session_time', 'c' => 's.session_page'); // Sorting and order if (!isset($sort_key_text[$sort_key])) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3e01cf733c..33fa839df4 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -365,7 +365,7 @@ if (!isset($topic_tracking_info)) $limit_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); -$sort_by_sql = array('a' => 'u.username', 't' => 'p.post_time', 's' => 'p.post_subject'); +$sort_by_sql = array('a' => 'u.username_clean', 't' => 'p.post_time', 's' => 'p.post_subject'); $s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
{NOT_MOVED_MESSAGES}
{RELEASE_MESSAGE_INFO}
+ + {RULE_REMOVED_MESSAGES} +
+ + + {NOT_MOVED_MESSAGES}
{RELEASE_MESSAGE_INFO} + +