diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-02 13:19:40 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-02 13:19:40 +0000 |
commit | 7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3 (patch) | |
tree | b2bbf1e855f1c185f76972777cef56b29e5e10d2 /phpBB/includes | |
parent | de1c536548c5b41d33a16f3afe12ba67000d7210 (diff) | |
download | forums-7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3.tar forums-7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3.tar.gz forums-7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3.tar.bz2 forums-7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3.tar.xz forums-7ad986c37e15bc51f5dc2cb42a4fa6445fde51e3.zip |
- a bunch of fixes
- added todos to the updater to make sure i do not forget. :)
git-svn-id: file:///svn/phpbb/trunk@6698 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
30 files changed, 78 insertions, 52 deletions
diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index 59694b294e..662a83d212 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -91,9 +91,9 @@ class acp_attachments 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), 'upload_path' => array('lang' => 'UPLOAD_DIR', 'validate' => 'wpath', 'type' => 'text:25:100', 'explain' => true), 'display_order' => array('lang' => 'DISPLAY_ORDER', 'validate' => 'bool', 'type' => 'custom', 'method' => 'display_order', 'explain' => true), - 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), - 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), - 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'int', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), + 'attachment_quota' => array('lang' => 'ATTACH_QUOTA', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), + 'max_filesize' => array('lang' => 'ATTACH_MAX_FILESIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), + 'max_filesize_pm' => array('lang' => 'ATTACH_MAX_PM_FILESIZE','validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), 'max_attachments' => array('lang' => 'MAX_ATTACHMENTS', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false), 'max_attachments_pm' => array('lang' => 'MAX_ATTACHMENTS_PM', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => false), 'secure_downloads' => array('lang' => 'SECURE_DOWNLOADS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index 44ab731072..d28319c731 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -119,7 +119,7 @@ class acp_ban $field = 'username'; $l_ban_cell = $user->lang['USERNAME']; - $sql = 'SELECT b.*, u.user_id, u.username + $sql = 'SELECT b.*, u.user_id, u.username, u.username_clean FROM ' . BANLIST_TABLE . ' b, ' . USERS_TABLE . ' u WHERE (b.ban_end >= ' . time() . ' OR b.ban_end = 0) diff --git a/phpBB/includes/acp/acp_database.php b/phpBB/includes/acp/acp_database.php index 7a8acab445..ef9822b83d 100644 --- a/phpBB/includes/acp/acp_database.php +++ b/phpBB/includes/acp/acp_database.php @@ -36,6 +36,8 @@ class acp_database { case 'backup': + $this->page_title = 'ACP_BACKUP'; + switch ($action) { case 'download': @@ -1168,6 +1170,9 @@ class acp_database break; case 'restore': + + $this->page_title = 'ACP_RESTORE'; + switch ($action) { case 'submit': diff --git a/phpBB/includes/acp/acp_disallow.php b/phpBB/includes/acp/acp_disallow.php index 70bdf30628..cbdc24a3b6 100644 --- a/phpBB/includes/acp/acp_disallow.php +++ b/phpBB/includes/acp/acp_disallow.php @@ -26,7 +26,7 @@ class acp_disallow // Set up general vars $this->tpl_name = 'acp_disallow'; - $this->page_header = 'ACP_DISALLOW_USERNAMES'; + $this->page_title = 'ACP_DISALLOW_USERNAMES'; $disallow = (isset($_POST['disallow'])) ? true : false; $allow = (isset($_POST['allow'])) ? true : false; diff --git a/phpBB/includes/acp/acp_email.php b/phpBB/includes/acp/acp_email.php index 5b79451634..fa29e7b209 100644 --- a/phpBB/includes/acp/acp_email.php +++ b/phpBB/includes/acp/acp_email.php @@ -65,7 +65,7 @@ class acp_email { if ($group_id) { - $sql = 'SELECT u.user_email, u.username, u.user_lang, u.user_jabber, u.user_notify_type + $sql = 'SELECT u.user_email, u.username, u.username_clean, u.user_lang, u.user_jabber, u.user_notify_type FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending = 0 @@ -75,7 +75,7 @@ class acp_email } else { - $sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang + $sql = 'SELECT username, username_clean, user_email, user_jabber, user_notify_type, user_lang FROM ' . USERS_TABLE . ' WHERE user_allow_massemail = 1 ORDER BY user_lang, user_notify_type'; diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index e81dc9883f..678a4f3bcf 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -574,11 +574,11 @@ class acp_groups $db->sql_freeresult($result); // Grab the members - $sql = 'SELECT u.user_id, u.username, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending + $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 - ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username"; + 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; diff --git a/phpBB/includes/acp/acp_permissions.php b/phpBB/includes/acp/acp_permissions.php index 5354d70f72..8b611ffef1 100644 --- a/phpBB/includes/acp/acp_permissions.php +++ b/phpBB/includes/acp/acp_permissions.php @@ -1064,7 +1064,7 @@ class acp_permissions $sql_permission_option = "AND o.auth_option LIKE '" . $db->sql_escape($permission_type) . "%'"; $sql = $db->sql_build_query('SELECT_DISTINCT', array( - 'SELECT' => 'u.username, u.user_regdate, u.user_id', + 'SELECT' => 'u.username, u.username_clean, u.user_regdate, u.user_id', 'FROM' => array( USERS_TABLE => 'u', @@ -1084,7 +1084,7 @@ class acp_permissions $sql_forum_id AND u.user_id = a.user_id", - 'ORDER_BY' => 'u.username, u.user_regdate ASC' + 'ORDER_BY' => 'u.username_clean, u.user_regdate ASC' )); $result = $db->sql_query($sql); diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index fac20449bc..140d3b7dda 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -23,7 +23,7 @@ class acp_update $user->add_lang('install'); $this->tpl_name = 'acp_update'; - $this->page_title = 'ACP_UPDATE'; + $this->page_title = 'ACP_VERSION_CHECK'; // Get current and latest version $errstr = ''; diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 9c8163bd14..43d6b862ff 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3140,7 +3140,7 @@ function page_header($page_title = '', $display_online_list = true) $db->sql_freeresult($result); } - $sql = 'SELECT u.username, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour, s.session_ip, s.session_viewonline + $sql = 'SELECT u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour, s.session_ip, s.session_viewonline FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s WHERE s.session_time >= ' . (time() - (intval($config['load_online_time']) * 60)) . $reading_sql . diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index c00a2cd3d9..23f243168f 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2161,7 +2161,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id return; } - $sql = "SELECT l.*, u.username, u.user_colour + $sql = "SELECT l.*, u.username, u.username_clean, u.user_colour FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u WHERE l.log_type = $log_type AND u.user_id = l.user_id diff --git a/phpBB/includes/functions_transfer.php b/phpBB/includes/functions_transfer.php index 3a3bb24563..4c47f99412 100644 --- a/phpBB/includes/functions_transfer.php +++ b/phpBB/includes/functions_transfer.php @@ -265,7 +265,11 @@ class ftp extends transfer // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end) $this->root_path = str_replace('\\', '/', $this->root_path); - $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + + if (!empty($root_path)) + { + $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + } // Init some needed values transfer::transfer(); @@ -479,7 +483,11 @@ class ftp_fsock extends transfer // Make sure $this->root_path is layed out the same way as the $user->page['root_script_path'] value (/ at the end) $this->root_path = str_replace('\\', '/', $this->root_path); - $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + + if (!empty($root_path)) + { + $this->root_path = (($root_path[0] != '/' ) ? '/' : '') . $root_path . ((substr($root_path, -1, 1) == '/') ? '' : '/'); + } // Init some needed values transfer::transfer(); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index d22add63ea..3272c9663e 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -1973,7 +1973,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna case 'approve': // Make sure we only approve those which are pending ;) - $sql = 'SELECT u.user_id, u.user_email, u.username, u.user_notify_type, u.user_jabber, u.user_lang + $sql = 'SELECT u.user_id, u.user_email, u.username, u.username_clean, u.user_notify_type, u.user_jabber, u.user_lang FROM ' . USERS_TABLE . ' u, ' . USER_GROUP_TABLE . ' ug WHERE ug.group_id = ' . $group_id . ' AND ug.user_pending = 1 @@ -2176,7 +2176,7 @@ function group_memberships($group_id_ary = false, $user_id_ary = false, $return_ $group_id_ary = (!is_array($group_id_ary)) ? array($group_id_ary) : $group_id_ary; } - $sql = 'SELECT ug.*, u.username, u.user_email + $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 '; diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index bf9ef5280d..4fdae3159d 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -180,7 +180,7 @@ function mcp_resync_topics($topic_ids) trigger_error($user->lang['NO_TOPIC_SELECTED']); } - if (check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_'))) + if (!check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_'))) { return; } diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index acfedb583f..d77d2fda60 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -63,7 +63,7 @@ function mcp_front_view($id, $mode, $action) } $db->sql_freeresult($result); - $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id + $sql = 'SELECT p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.username, u.username_clean, t.topic_id, t.topic_title, t.topic_first_post_id, p.forum_id FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_list) . ' AND t.topic_id = p.topic_id @@ -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_colour, 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.username_clean, u.user_colour, u.user_id, t.topic_id, t.topic_title, f.forum_id, f.forum_name', 'FROM' => array( REPORTS_TABLE => 'r', diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index a59d965300..262e9d0c74 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -226,7 +226,7 @@ function lock_unlock($action, $ids) } unset($orig_ids); - $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); $s_hidden_fields = build_hidden_fields(array( $sql_id . '_list' => $ids, @@ -591,7 +591,7 @@ function mcp_delete_topic($topic_ids) return; } - $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); $forum_id = request_var('f', 0); $s_hidden_fields = build_hidden_fields(array( @@ -647,7 +647,7 @@ function mcp_delete_post($post_ids) return; } - $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); $forum_id = request_var('f', 0); $s_hidden_fields = build_hidden_fields(array( @@ -770,7 +770,7 @@ function mcp_fork_topic($topic_ids) $to_forum_id = request_var('to_forum_id', 0); $forum_id = request_var('forum_id', 0); - $redirect = request_var('redirect', build_url(array('_f_', 'action'))); + $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); $additional_msg = $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index 84bba18bb7..96fe1f9bd0 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -41,7 +41,8 @@ class mcp_notes { case 'front': $template->assign_vars(array( - 'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'), + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username', false), 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes'), 'L_TITLE' => $user->lang['MCP_NOTES']) diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index a1cc7f4331..44558eb553 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -119,7 +119,8 @@ function mcp_post_details($id, $mode, $action) 'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false, 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '', - 'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username'), + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_chgposter&field=username', false), 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'U_MCP_USER_NOTES' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $post_info['user_id']), @@ -316,7 +317,7 @@ function mcp_post_details($id, $mode, $action) */ function change_poster(&$post_info, $userdata) { - global $auth, $db, $config; + global $auth, $db, $config, $phpbb_root_path, $phpEx; if (empty($userdata) || $userdata['user_id'] == $post_info['user_id']) { diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index df23bcd98f..3fd7e6d856 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -248,7 +248,7 @@ class mcp_queue if (sizeof($post_ids)) { - $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour + $sql = 'SELECT t.topic_id, t.topic_title, t.forum_id, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('p.post_id', $post_ids) . ' AND t.topic_id = p.topic_id @@ -382,7 +382,7 @@ function approve_post($post_id_list, $mode) trigger_error('NOT_AUTHORIZED'); } - $redirect = request_var('redirect', build_url(array('_f_'))); + $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( @@ -627,7 +627,7 @@ function disapprove_post($post_id_list, $mode) trigger_error('NOT_AUTHORIZED'); } - $redirect = request_var('redirect', build_url(array('t', 'mode', '_f_')) . '&mode=unapproved_topics'); + $redirect = request_var('redirect', build_url(array('t', 'mode', '_f_', 'quickmod')) . '&mode=unapproved_topics'); $reason = request_var('reason', '', true); $reason_id = request_var('reason_id', 0); $success_msg = $additional_msg = ''; diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 7a84c872a5..91e5b8633b 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, u.user_colour + $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.username_clean, 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 @@ -279,7 +279,7 @@ class mcp_reports if (sizeof($report_ids)) { - $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id + $sql = 'SELECT t.forum_id, t.topic_id, t.topic_title, p.post_id, p.post_subject, p.post_username, p.poster_id, p.post_time, u.username, u.username_clean, u.user_colour, r.user_id as reporter_id, ru.username as reporter_name, ru.user_colour as reporter_colour, r.report_time, r.report_id FROM ' . REPORTS_TABLE . ' r, ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . ' u, ' . USERS_TABLE . ' ru WHERE ' . $db->sql_in_set('r.report_id', $report_ids) . ' AND t.topic_id = p.topic_id @@ -361,15 +361,15 @@ function close_report($post_id_list, $mode, $action) if ($action == 'delete' && strpos($user->data['session_page'], 'mode=report_details') !== false) { - $redirect = request_var('redirect', build_url(array('mode', '_f_', 'r')) . '&mode=reports'); + $redirect = request_var('redirect', build_url(array('mode', '_f_', 'r', 'quickmod')) . '&mode=reports'); } else if ($action == 'close' && !request_var('r', 0)) { - $redirect = request_var('redirect', build_url(array('mode', '_f_', 'p')) . '&mode=reports'); + $redirect = request_var('redirect', build_url(array('mode', '_f_', 'p', 'quickmod')) . '&mode=reports'); } else { - $redirect = request_var('redirect', build_url(array('_f_'))); + $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); } $success_msg = ''; @@ -385,7 +385,7 @@ function close_report($post_id_list, $mode, $action) { $post_info = get_post_data($post_id_list, 'm_report'); - $sql = 'SELECT r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type + $sql = 'SELECT r.post_id, r.report_closed, r.user_id, r.user_notify, u.username, u.username_clean, u.user_email, u.user_jabber, u.user_lang, u.user_notify_type FROM ' . REPORTS_TABLE . ' r, ' . USERS_TABLE . ' u WHERE ' . $db->sql_in_set('r.post_id', array_keys($post_info)) . ' ' . (($action == 'close') ? 'AND r.report_closed = 0' : '') . ' diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index ae4ed9850c..44904358e5 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -79,7 +79,7 @@ function mcp_topic_view($id, $mode, $action) $posts_per_page = $total; } - $sql = 'SELECT u.username, u.user_colour, p.* + $sql = 'SELECT u.username, u.username_clean, u.user_colour, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . ' p.topic_id = ' . $topic_id . ' ' . @@ -467,6 +467,7 @@ function merge_posts($topic_id, $to_topic_id) if (sizeof($topic_data)) { + $topic_data = $topic_data[$topic_id]; $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $topic_data['forum_id'] . '&t=' . $topic_id) . '">', '</a>'); } diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index ef8d0132fc..cce30833ff 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -71,7 +71,8 @@ function mcp_warn_front_view($id, $mode) global $template, $db, $user, $auth; $template->assign_vars(array( - 'U_FIND_MEMBER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'), + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp&field=username', false), 'U_POST_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_user'), ) ); @@ -102,7 +103,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_colour, u.user_warnings, w.warning_time + $sql = 'SELECT u.user_id, u.username, u.username_clean, 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'; diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 1408463c0b..80d66291d7 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -870,9 +870,10 @@ class session * Only IPv4 (rbldns does not support AAAA records/IPv6 lookups) * * @author satmd (from the php manual) + * @param string $mode register/post - spamcop for example is ommitted for posting * @return false if ip is not blacklisted, else an array([checked server], [lookup]) */ - function check_dnsbl($ip = false) + function check_dnsbl($mode, $ip = false) { if ($ip === false) { @@ -880,11 +881,15 @@ class session } $dnsbl_check = array( - 'bl.spamcop.net' => 'http://spamcop.net/bl.shtml?', 'list.dsbl.org' => 'http://dsbl.org/listing?', 'sbl-xbl.spamhaus.org' => 'http://www.spamhaus.org/query/bl?ip=', ); + if ($mode == 'register') + { + $dnsbl_check['bl.spamcop.net'] = 'http://spamcop.net/bl.shtml?'; + } + if ($ip) { $quads = explode('.', $ip); diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index 1536411e9d..13ce175720 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -172,7 +172,7 @@ class ucp_groups include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger(); - $sql = 'SELECT u.username, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang + $sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u WHERE ug.user_id = u.user_id AND ' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? "ug.user_id = {$user->data['user_id']}" : 'ug.group_leader = 1') . " @@ -675,11 +675,11 @@ class ucp_groups $start = request_var('start', 0); // Grab the members - $sql = 'SELECT u.user_id, u.username, u.user_regdate, u.user_posts, u.group_id, ug.group_leader, ug.user_pending + $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 - ORDER BY ug.group_leader DESC, ug.user_pending ASC, u.username"; + 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; diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index b51f265df3..50eb91297d 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -368,6 +368,7 @@ class ucp_pm 'U_OUTBOX' => $this->u_action . '&folder=outbox', 'U_SENTBOX' => $this->u_action . '&folder=sentbox', 'U_CREATE_FOLDER' => $this->u_action . '&mode=options', + 'U_CURRENT_FOLDER' => $this->u_action . '&folder=' . $folder_id, 'S_IN_INBOX' => ($folder_id == PRIVMSGS_INBOX) ? true : false, 'S_IN_OUTBOX' => ($folder_id == PRIVMSGS_OUTBOX) ? true : false, diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index 3cfb2f37a9..8fa5de090f 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -90,7 +90,8 @@ function compose_pm($id, $mode, $action) 'S_SHOW_PM_BOX' => true, 'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false, 'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '', - 'U_SEARCH_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=post&field=username_list')) + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=post&field=username_list'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=post&field=username_list', true)) ); } diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 4277639d83..d301e2ecb9 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -519,7 +519,7 @@ function get_pm_from($folder_id, $folder, $user_id) $sql_start = $start; } - $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.user_colour + $sql = 'SELECT t.*, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.username_clean, u.user_colour FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u WHERE t.user_id = $user_id AND p.author_id = u.user_id diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 9a19baa257..6764dd9d43 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -193,6 +193,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'MESSAGE' => $message, 'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '', 'EDITED_MESSAGE' => $l_edited_by, + 'MESSAGE_ID' => $message_row['msg_id'], 'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&p=' . $message_row['msg_id'], true, $user->session_id) : '', 'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '', diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index e72673c023..e57cc3ec26 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -215,7 +215,7 @@ class ucp_prefs $limit_post_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_post_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']); - $sort_by_post_sql = array('a' => 'u.username', 't' => 'p.post_id', 's' => 'p.post_subject'); + $sort_by_post_sql = array('a' => 'u.username_clean', 't' => 'p.post_id', 's' => 'p.post_subject'); $_options = array('topic', 'post'); foreach ($_options as $sort_option) diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index fcbc2675f8..2e355fe3c2 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -157,7 +157,7 @@ class ucp_register // DNSBL check if ($config['check_dnsbl']) { - if (($dnsbl = $user->check_dnsbl()) !== false) + if (($dnsbl = $user->check_dnsbl('register')) !== false) { $error[] = sprintf($user->lang['IP_BLACKLISTED'], $user->ip, $dnsbl[1]); } diff --git a/phpBB/includes/ucp/ucp_zebra.php b/phpBB/includes/ucp/ucp_zebra.php index b65ba2fd29..c9478fd01a 100644 --- a/phpBB/includes/ucp/ucp_zebra.php +++ b/phpBB/includes/ucp/ucp_zebra.php @@ -48,7 +48,7 @@ class ucp_zebra // 'nice' and automatically handle names added to one list present on // the other (by removing the existing one) ... but I have a feeling this // may lead to complaints - $sql = 'SELECT z.*, u.username + $sql = 'SELECT z.*, u.username, u.username_clean FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u WHERE z.user_id = ' . $user->data['user_id'] . ' AND u.user_id = z.zebra_id'; @@ -197,7 +197,7 @@ class ucp_zebra } $sql_and = ($mode == 'friends') ? 'z.friend = 1' : 'z.foe = 1'; - $sql = 'SELECT z.*, u.username + $sql = 'SELECT z.*, u.username, u.username_clean FROM ' . ZEBRA_TABLE . ' z, ' . USERS_TABLE . ' u WHERE z.user_id = ' . $user->data['user_id'] . " AND $sql_and @@ -215,7 +215,8 @@ class ucp_zebra $template->assign_vars(array( 'L_TITLE' => $user->lang['UCP_ZEBRA_' . $l_mode], - 'U_SEARCH_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=add'), + 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=add'), + 'UA_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=ucp&field=add', true), 'S_USERNAME_OPTIONS' => $s_username_options, 'S_HIDDEN_FIELDS' => $s_hidden_fields, |