1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-08 17:56:52 +02:00

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
This commit is contained in:
Meik Sievertsen
2006-11-24 14:59:26 +00:00
parent a0c3a326bd
commit d529f78adb
63 changed files with 378 additions and 162 deletions

View File

@@ -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;

View File

@@ -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 . '&amp;folder=' . $folder_id . '&amp;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,

View File

@@ -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);

View File

@@ -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;

View File

@@ -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']),

View File

@@ -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'];
}

View File

@@ -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 = '';