diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-26 14:55:18 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-26 14:55:18 +0000 |
commit | 6583f90b8d082096ebd9cfc0588730dd36efb077 (patch) | |
tree | 36d01de359aafeabe6daa571ea2c0a40da41ab14 | |
parent | 5c5330c29d3e19eab804d9dbfd0261e6459e00b8 (diff) | |
download | forums-6583f90b8d082096ebd9cfc0588730dd36efb077.tar forums-6583f90b8d082096ebd9cfc0588730dd36efb077.tar.gz forums-6583f90b8d082096ebd9cfc0588730dd36efb077.tar.bz2 forums-6583f90b8d082096ebd9cfc0588730dd36efb077.tar.xz forums-6583f90b8d082096ebd9cfc0588730dd36efb077.zip |
- bug fixes for #5618, #5588 and #5584
- remove messenger->reset() calls (they are already performed on sending)
git-svn-id: file:///svn/phpbb/trunk@6660 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/acp/acp_groups.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 6 | ||||
-rw-r--r-- | phpBB/includes/functions_posting.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 1 | ||||
-rwxr-xr-x | phpBB/includes/mcp/mcp_notes.php | 3 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 10 | ||||
-rwxr-xr-x | phpBB/includes/mcp/mcp_reports.php | 5 | ||||
-rwxr-xr-x | phpBB/includes/mcp/mcp_warn.php | 6 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_groups.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 3 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_profile.php | 6 | ||||
-rw-r--r-- | phpBB/memberlist.php | 3 | ||||
-rw-r--r-- | phpBB/viewforum.php | 2 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 3 |
15 files changed, 30 insertions, 29 deletions
diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index a418f279e8..e81dc9883f 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -450,6 +450,8 @@ class acp_groups if (isset($group_row['group_avatar']) && $group_row['group_avatar']) { + $avatar_img = ''; + switch ($group_row['group_avatar_type']) { case AVATAR_UPLOAD: @@ -460,8 +462,8 @@ class acp_groups $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } else diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 001702a39e..bf1883e96f 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2433,8 +2433,8 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_ include("{$phpbb_root_path}includes/functions_display.$phpEx"); } - $attachment_tpl = display_attachments($forum_id, NULL, $attachments, $update_count, false, true); - $tpl_size = sizeof($attachment_tpl); + $attachments = display_attachments($forum_id, NULL, $attachments, $update_count, false, true); + $tpl_size = sizeof($attachments); $unset_tpl = array(); @@ -2447,7 +2447,7 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_ $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; $replace['from'][] = $matches[0][$num]; - $replace['to'][] = (isset($attachment_tpl[$index])) ? $attachment_tpl[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); + $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); $unset_tpl[] = $index; } diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 23460c8dec..49ed4932a3 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -1124,7 +1124,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id )); $messenger->send($addr['method']); - $messenger->reset(); } } unset($msg_list_ary); diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 1107f824be..d67478b190 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1623,7 +1623,6 @@ function pm_notification($mode, $author, $recipients, $subject, $message) ); $messenger->send($addr['method']); - $messenger->reset(); } unset($msg_list_ary); diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 19c2b21655..971a544d11 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2018,7 +2018,6 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $messenger->save_queue(); diff --git a/phpBB/includes/mcp/mcp_notes.php b/phpBB/includes/mcp/mcp_notes.php index e681ebab96..84bba18bb7 100755 --- a/phpBB/includes/mcp/mcp_notes.php +++ b/phpBB/includes/mcp/mcp_notes.php @@ -142,6 +142,7 @@ class mcp_notes // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -154,8 +155,8 @@ class mcp_notes $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 32aaa3e533..df23bcd98f 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -558,12 +558,11 @@ function approve_post($post_id_list, $mode) ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } + $messenger->save_queue(); + // Send out normal user notifications $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); @@ -780,13 +779,12 @@ function disapprove_post($post_id_list, $mode) ); $messenger->send($post_data['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } unset($post_info, $disapprove_reason); + $messenger->save_queue(); + if (sizeof($forum_topics_real)) { $success_msg = ($num_disapproved == 1) ? 'TOPIC_DISAPPROVED_SUCCESS' : 'TOPICS_DISAPPROVED_SUCCESS'; diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 709d685e88..7a84c872a5 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -494,13 +494,12 @@ function close_report($post_id_list, $mode, $action) ); $messenger->send($reporter['user_notify_type']); - $messenger->reset(); } - - $messenger->save_queue(); } unset($notify_reporters, $post_info); + $messenger->save_queue(); + $success_msg = (sizeof($post_id_list) == 1) ? 'REPORT_' . strtoupper($action) . 'D_SUCCESS' : 'REPORTS_' . strtoupper($action) . 'D_SUCCESS'; } else diff --git a/phpBB/includes/mcp/mcp_warn.php b/phpBB/includes/mcp/mcp_warn.php index 4206582d01..ef8d0132fc 100755 --- a/phpBB/includes/mcp/mcp_warn.php +++ b/phpBB/includes/mcp/mcp_warn.php @@ -275,6 +275,7 @@ function mcp_warn_post_view($id, $mode, $action) // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -287,8 +288,8 @@ function mcp_warn_post_view($id, $mode, $action) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } @@ -359,6 +360,7 @@ function mcp_warn_user_view($id, $mode, $action) // get_user_rank($userrow['user_rank'], $userrow['user_posts'], $rank_title, $rank_img); $avatar_img = ''; + if (!empty($userrow['user_avatar'])) { switch ($userrow['user_avatar_type']) @@ -371,8 +373,8 @@ function mcp_warn_user_view($id, $mode, $action) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $userrow['user_avatar']; + $avatar_img .= $userrow['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $userrow['user_avatar_width'] . '" height="' . $userrow['user_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index e4a38f2b04..1536411e9d 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -196,7 +196,6 @@ class ucp_groups ); $messenger->send($row['user_notify_type']); - $messenger->reset(); } $db->sql_freeresult($result); @@ -575,6 +574,8 @@ class ucp_groups if (isset($group_row['group_avatar']) && $group_row['group_avatar']) { + $avatar_img = ''; + switch ($group_row['group_avatar_type']) { case AVATAR_UPLOAD: @@ -585,8 +586,8 @@ class ucp_groups $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } else diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index cc23fc0fce..9a19baa257 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -426,6 +426,7 @@ function get_user_information($user_id, $user_row) if ($user_row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($user_row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -436,8 +437,8 @@ function get_user_information($user_id, $user_row) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $user_row['user_avatar']; + $avatar_img .= $user_row['user_avatar']; $user_row['avatar'] = '<img src="' . $avatar_img . '" width="' . $user_row['user_avatar_width'] . '" height="' . $user_row['user_avatar_height'] . '" alt="' . $user->lang['USER_AVATAR'] . '" />'; } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 92612bfa28..29055f0d89 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -125,7 +125,7 @@ class ucp_profile $key_len = ($key_len > 6) ? $key_len : 6; $user_actkey = substr($user_actkey, 0, $key_len); - $messenger = new messenger(); + $messenger = new messenger(false); $template_file = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? 'user_activate_inactive' : 'user_activate'; $messenger->template($template_file, $user->data['user_lang']); @@ -182,8 +182,6 @@ class ucp_profile $db->sql_freeresult($result); } - $messenger->save_queue(); - user_active_flip('deactivate', $user->data['user_id'], INACTIVE_PROFILE); $sql_ary += array( @@ -605,8 +603,8 @@ class ucp_profile $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $user->data['user_avatar']; + $avatar_img .= $user->data['user_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $user->data['user_avatar_width'] . '" height="' . $user->data['user_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index cfea2f9eab..b066bf05a9 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1058,6 +1058,7 @@ switch ($mode) } $avatar_img = ''; + if ($group_row['group_avatar']) { switch ($group_row['group_avatar_type']) @@ -1070,8 +1071,8 @@ switch ($mode) $avatar_img = $phpbb_root_path . $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $group_row['group_avatar']; + $avatar_img .= $group_row['group_avatar']; $avatar_img = '<img src="' . $avatar_img . '" width="' . $group_row['group_avatar_width'] . '" height="' . $group_row['group_avatar_height'] . '" alt="" />'; } diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index cd938313cf..9d6da5c31c 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -469,7 +469,7 @@ if (sizeof($topic_list)) $topic_forum_list = array(); foreach ($rowset as $t_id => $row) { - $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered']) ? $row['forum_mark_time'] : 0; + $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread'] && $user->data['is_registered'] && isset($row['forum_mark_time'])) ? $row['forum_mark_time'] : 0; $topic_forum_list[$row['forum_id']]['topics'][] = $t_id; } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 33fa839df4..fa28b568b8 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1032,6 +1032,7 @@ while ($row = $db->sql_fetchrow($result)) if ($row['user_avatar'] && $user->optionget('viewavatars')) { $avatar_img = ''; + switch ($row['user_avatar_type']) { case AVATAR_UPLOAD: @@ -1042,8 +1043,8 @@ while ($row = $db->sql_fetchrow($result)) $avatar_img = $config['avatar_gallery_path'] . '/'; break; } - $avatar_img .= $row['user_avatar']; + $avatar_img .= $row['user_avatar']; $user_cache[$poster_id]['avatar'] = '<img src="' . $avatar_img . '" width="' . $row['user_avatar_width'] . '" height="' . $row['user_avatar_height'] . '" alt="" />'; } |