diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-24 14:59:26 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-24 14:59:26 +0000 |
commit | d529f78adb85698c9382ad29e4583f309eaf850a (patch) | |
tree | 58f973b636dac28e93c10274fc58b3bff777afc8 /phpBB/includes/ucp | |
parent | a0c3a326bd0e0162217589c57af90e7b477e4e88 (diff) | |
download | forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.gz forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.bz2 forums-d529f78adb85698c9382ad29e4583f309eaf850a.tar.xz forums-d529f78adb85698c9382ad29e4583f309eaf850a.zip |
rather large update, most important things done:
- implemented provided patch/diff file for bug #5350 (Highway of Life) with some tiny changes and alterations
- more username/colour changes/fixes
- added a note about PM rule-dependant message removals so the user is not wondering too much if he can't remember his rules. :)
- some column changes to fix unicode issues
- bugfixes
git-svn-id: file:///svn/phpbb/trunk@6650 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 4 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm.php | 10 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewfolder.php | 4 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 6 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 2 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 15 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_zebra.php | 2 |
7 files changed, 29 insertions, 14 deletions
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'], '<a href="' . $this->u_action . '&folder=' . $folder_id . '&release=1">', '</a>'), '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 = ''; |