mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-06 15:45:34 +02:00
lets pm working again.
git-svn-id: file:///svn/phpbb/trunk@4979 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
57b188b7af
commit
e3eaeef0f7
@ -688,15 +688,21 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $encoding, $headers
|
|||||||
$mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>';
|
$mail_rcpt['to'][] = '<' . trim($which_ary['email']) . '>';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($addresses['bcc'] as $which_ary)
|
if (isset($addresses['bcc']) && sizeof($addresses['bcc']))
|
||||||
{
|
{
|
||||||
$mail_rcpt['bcc'][] = '<' . trim($which_ary['email']) . '>';
|
foreach ($addresses['bcc'] as $which_ary)
|
||||||
|
{
|
||||||
|
$mail_rcpt['bcc'][] = '<' . trim($which_ary['email']) . '>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($addresses['cc'] as $which_ary)
|
if (isset($addresses['cc']) && sizeof($addresses['cc']))
|
||||||
{
|
{
|
||||||
$mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']), $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
|
foreach ($addresses['cc'] as $which_ary)
|
||||||
$mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>';
|
{
|
||||||
|
$mail_cc[] = ($which_ary['name'] != '') ? mail_encode(trim($which_ary['name']), $encoding) . ' <' . trim($which_ary['email']) . '>' : '<' . trim($which_ary['email']) . '>';
|
||||||
|
$mail_rcpt['cc'][] = '<' . trim($which_ary['email']) . '>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$smtp = new smtp_class;
|
$smtp = new smtp_class;
|
||||||
|
@ -1058,7 +1058,7 @@ function submit_pm($mode, $subject, $data, $update_message, $put_in_outbox = tru
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
print_r($data);
|
||||||
$current_time = time();
|
$current_time = time();
|
||||||
|
|
||||||
// Collect some basic informations about which tables and which rows to update/insert
|
// Collect some basic informations about which tables and which rows to update/insert
|
||||||
@ -1074,7 +1074,7 @@ function submit_pm($mode, $subject, $data, $update_message, $put_in_outbox = tru
|
|||||||
// u|g => array($user_id => 'to'|'bcc')
|
// u|g => array($user_id => 'to'|'bcc')
|
||||||
foreach (array('u', 'g') as $ug_type)
|
foreach (array('u', 'g') as $ug_type)
|
||||||
{
|
{
|
||||||
if (sizeof($data['address_list'][$ug_type]))
|
if (isset($data['address_list'][$ug_type]) && sizeof($data['address_list'][$ug_type]))
|
||||||
{
|
{
|
||||||
foreach ($data['address_list'][$ug_type] as $id => $field)
|
foreach ($data['address_list'][$ug_type] as $id => $field)
|
||||||
{
|
{
|
||||||
@ -1088,7 +1088,7 @@ function submit_pm($mode, $subject, $data, $update_message, $put_in_outbox = tru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($data['address_list']['g']))
|
if (isset($data['address_list']['g']) && sizeof($data['address_list']['g']))
|
||||||
{
|
{
|
||||||
$sql = 'SELECT group_id, user_id
|
$sql = 'SELECT group_id, user_id
|
||||||
FROM ' . USER_GROUP_TABLE . '
|
FROM ' . USER_GROUP_TABLE . '
|
||||||
@ -1141,7 +1141,7 @@ function submit_pm($mode, $subject, $data, $update_message, $put_in_outbox = tru
|
|||||||
'message_text' => $data['message'],
|
'message_text' => $data['message'],
|
||||||
'message_checksum' => $data['message_md5'],
|
'message_checksum' => $data['message_md5'],
|
||||||
'message_encoding' => $user->lang['ENCODING'],
|
'message_encoding' => $user->lang['ENCODING'],
|
||||||
'message_attachment'=> (sizeof($data['filename_data']['physical_filename'])) ? 1 : 0,
|
'message_attachment'=> (isset($data['filename_data']['physical_filename']) && sizeof($data['filename_data']['physical_filename'])) ? 1 : 0,
|
||||||
'bbcode_bitfield' => $data['bbcode_bitfield'],
|
'bbcode_bitfield' => $data['bbcode_bitfield'],
|
||||||
'bbcode_uid' => $data['bbcode_uid'],
|
'bbcode_uid' => $data['bbcode_uid'],
|
||||||
'to_address' => implode(':', $to),
|
'to_address' => implode(':', $to),
|
||||||
@ -1360,7 +1360,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
|||||||
if (trim($row['user_email']))
|
if (trim($row['user_email']))
|
||||||
{
|
{
|
||||||
$msg_list_ary[] = array(
|
$msg_list_ary[] = array(
|
||||||
'method' => $row['method'],
|
'method' => $row['user_notify_type'],
|
||||||
'email' => $row['user_email'],
|
'email' => $row['user_email'],
|
||||||
'jabber' => $row['user_jabber'],
|
'jabber' => $row['user_jabber'],
|
||||||
'name' => $row['username'],
|
'name' => $row['username'],
|
||||||
@ -1393,6 +1393,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
|||||||
'SITENAME' => $config['sitename'],
|
'SITENAME' => $config['sitename'],
|
||||||
'SUBJECT' => $subject,
|
'SUBJECT' => $subject,
|
||||||
'AUTHOR_NAME' => $author,
|
'AUTHOR_NAME' => $author,
|
||||||
|
'USERNAME' => $addr['name'],
|
||||||
|
|
||||||
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=unread")
|
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=unread")
|
||||||
);
|
);
|
||||||
|
@ -333,6 +333,11 @@ class ucp_pm extends module
|
|||||||
'MSG_ID' => $msg_id)
|
'MSG_ID' => $msg_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!$msg_id)
|
||||||
|
{
|
||||||
|
trigger_error('NO_MESSAGE');
|
||||||
|
}
|
||||||
|
|
||||||
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.'.$phpEx);
|
include($phpbb_root_path . 'includes/ucp/ucp_pm_viewmessage.'.$phpEx);
|
||||||
view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row);
|
view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row);
|
||||||
|
|
||||||
|
@ -212,11 +212,14 @@ function compose_pm($id, $mode, $action)
|
|||||||
{
|
{
|
||||||
$address_list['g'][$to_group_id] = 'to';
|
$address_list['g'][$to_group_id] = 'to';
|
||||||
}
|
}
|
||||||
unset($to_user_id, $to_group_id);
|
|
||||||
|
|
||||||
$check_value = 0;
|
$check_value = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (($to_group_id || isset($address_list['g'])) && !$config['allow_mass_pm'])
|
||||||
|
{
|
||||||
|
trigger_error('NOT_ALLOWED_MASS_PM');
|
||||||
|
}
|
||||||
|
|
||||||
if ($action == 'edit' && !$refresh && !$preview && !$submit)
|
if ($action == 'edit' && !$refresh && !$preview && !$submit)
|
||||||
{
|
{
|
||||||
if (!($message_time > time() - $config['pm_edit_time'] || !$config['pm_edit_time']))
|
if (!($message_time > time() - $config['pm_edit_time'] || !$config['pm_edit_time']))
|
||||||
@ -458,7 +461,7 @@ function compose_pm($id, $mode, $action)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Subject defined
|
// Subject defined
|
||||||
if (!$subject)
|
if (!$subject && !($remove_u || $remove_g || $add_to || $add_bcc))
|
||||||
{
|
{
|
||||||
$error[] = $user->lang['EMPTY_SUBJECT'];
|
$error[] = $user->lang['EMPTY_SUBJECT'];
|
||||||
}
|
}
|
||||||
@ -468,7 +471,7 @@ function compose_pm($id, $mode, $action)
|
|||||||
$error[] = $user->lang['NO_RECIPIENT'];
|
$error[] = $user->lang['NO_RECIPIENT'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sizeof($message_parser->warn_msg))
|
if (sizeof($message_parser->warn_msg) && !($remove_u || $remove_g || $add_to || $add_bcc))
|
||||||
{
|
{
|
||||||
$error[] = implode('<br />', $message_parser->warn_msg);
|
$error[] = implode('<br />', $message_parser->warn_msg);
|
||||||
}
|
}
|
||||||
@ -477,22 +480,16 @@ function compose_pm($id, $mode, $action)
|
|||||||
if (!sizeof($error) && $submit)
|
if (!sizeof($error) && $submit)
|
||||||
{
|
{
|
||||||
$pm_data = array(
|
$pm_data = array(
|
||||||
'subject' => (!$message_subject) ? $subject : $message_subject,
|
|
||||||
'msg_id' => (int) $msg_id,
|
'msg_id' => (int) $msg_id,
|
||||||
'reply_from_root_level' => (int) $root_level,
|
'reply_from_root_level' => (isset($root_level)) ? (int) $root_level : 0,
|
||||||
'reply_from_msg_id' => (int) $msg_id,
|
'reply_from_msg_id' => (int) $msg_id,
|
||||||
'icon_id' => (int) $icon_id,
|
'icon_id' => (int) $icon_id,
|
||||||
'author_id' => (int) $author_id,
|
|
||||||
'enable_sig' => (bool) $enable_sig,
|
'enable_sig' => (bool) $enable_sig,
|
||||||
'enable_bbcode' => (bool) $enable_bbcode,
|
'enable_bbcode' => (bool) $enable_bbcode,
|
||||||
'enable_html' => (bool) $enable_html,
|
'enable_html' => (bool) $enable_html,
|
||||||
'enable_smilies' => (bool) $enable_smilies,
|
'enable_smilies' => (bool) $enable_smilies,
|
||||||
'enable_urls' => (bool) $enable_urls,
|
'enable_urls' => (bool) $enable_urls,
|
||||||
'message_md5' => (int) $message_md5,
|
'message_md5' => (int) $message_md5,
|
||||||
'post_checksum' => (int) $post_checksum,
|
|
||||||
'post_edit_reason' => $post_edit_reason,
|
|
||||||
'post_edit_user' => ($action == 'edit') ? $user->data['user_id'] : (int) $post_edit_user,
|
|
||||||
'author_ip' => (int) $author_ip,
|
|
||||||
'bbcode_bitfield' => (int) $message_parser->bbcode_bitfield,
|
'bbcode_bitfield' => (int) $message_parser->bbcode_bitfield,
|
||||||
'bbcode_uid' => $message_parser->bbcode_uid,
|
'bbcode_uid' => $message_parser->bbcode_uid,
|
||||||
'message' => $message_parser->message,
|
'message' => $message_parser->message,
|
||||||
@ -502,13 +499,14 @@ function compose_pm($id, $mode, $action)
|
|||||||
);
|
);
|
||||||
unset($message_parser);
|
unset($message_parser);
|
||||||
|
|
||||||
$msg_id = submit_pm($action, $subject, $username, $pm_data, $update_message);
|
// ((!$message_subject) ? $subject : $message_subject)
|
||||||
|
$msg_id = submit_pm($action, $subject, $pm_data, $update_message);
|
||||||
|
|
||||||
$return_message_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=view_messages&action=view_message&p=" . $data['msg_id'];
|
$return_message_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&mode=view_messages&action=view_message&p=" . $msg_id;
|
||||||
$return_folder_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=outbox";
|
$return_folder_url = "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=outbox";
|
||||||
meta_refresh(3, $return_message_url);
|
meta_refresh(3, $return_message_url);
|
||||||
|
|
||||||
$message = $user->lang['MESSAGE_STORED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $return_message_url . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $return_folder_url . '">', '</a>');
|
$message = $user->lang['MESSAGE_STORED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $return_message_url . '">', '</a>') . '<br /><br />' . sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . $return_folder_url . '">', '</a>', $user->lang['PM_OUTBOX']);
|
||||||
trigger_error($message);
|
trigger_error($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -634,7 +632,7 @@ function compose_pm($id, $mode, $action)
|
|||||||
{
|
{
|
||||||
$result['g'] = $db->sql_query('SELECT group_id as id, group_name as name, group_colour as colour
|
$result['g'] = $db->sql_query('SELECT group_id as id, group_name as name, group_colour as colour
|
||||||
FROM ' . GROUPS_TABLE . '
|
FROM ' . GROUPS_TABLE . '
|
||||||
WHERE group_id IN (' . implode(', ', array_map('intval', array_keys($address_list['g']))) . ')');
|
WHERE group_receive_pm = 1 AND group_id IN (' . implode(', ', array_map('intval', array_keys($address_list['g']))) . ')');
|
||||||
}
|
}
|
||||||
|
|
||||||
$u = $g = array();
|
$u = $g = array();
|
||||||
@ -656,6 +654,12 @@ function compose_pm($id, $mode, $action)
|
|||||||
{
|
{
|
||||||
foreach ($adr_ary as $id => $field)
|
foreach ($adr_ary as $id => $field)
|
||||||
{
|
{
|
||||||
|
if (!isset(${$type}[$id]))
|
||||||
|
{
|
||||||
|
unset($address_list[$type][$id]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$field = ($field == 'to') ? 'to' : 'bcc';
|
$field = ($field == 'to') ? 'to' : 'bcc';
|
||||||
$type = ($type == 'u') ? 'u' : 'g';
|
$type = ($type == 'u') ? 'u' : 'g';
|
||||||
$id = (int) $id;
|
$id = (int) $id;
|
||||||
|
@ -540,26 +540,6 @@ $unused = array(
|
|||||||
'Find' => 'Find',
|
'Find' => 'Find',
|
||||||
'Flag' => 'Flag',
|
'Flag' => 'Flag',
|
||||||
'From' => 'From',
|
'From' => 'From',
|
||||||
'Group_Control_Panel' => 'Group Control Panel',
|
|
||||||
'Group_Information' => 'Group Information',
|
|
||||||
'Group_Members' => 'Group Members',
|
|
||||||
'Group_Moderator' => 'Group Moderator',
|
|
||||||
'Group_added' => 'You have been added to this usergroup',
|
|
||||||
'Group_approved' => 'Your request has been approved',
|
|
||||||
'Group_closed' => 'Closed group',
|
|
||||||
'Group_description' => 'Group description',
|
|
||||||
'Group_hidden' => 'Hidden group',
|
|
||||||
'Group_hidden_members' => 'This group is hidden, you cannot view its membership',
|
|
||||||
'Group_joined' => 'You have successfully subscribed to this group<br />You will be notified when your subscription is approved by the group moderator',
|
|
||||||
'Group_member_details' => 'Group Membership Details',
|
|
||||||
'Group_member_join' => 'Join a Group',
|
|
||||||
'Group_membership' => 'Group membership',
|
|
||||||
'Group_name' => 'Group name',
|
|
||||||
'Group_not_exist' => 'That user group does not exist',
|
|
||||||
'Group_open' => 'Open group',
|
|
||||||
'Group_request' => 'A request to join your group has been made',
|
|
||||||
'Group_type' => 'Group type',
|
|
||||||
'Group_type_updated' => 'Successfully updated group type',
|
|
||||||
'IP_ADDRESS' => 'IP Address',
|
'IP_ADDRESS' => 'IP Address',
|
||||||
'Inbox' => 'Inbox',
|
'Inbox' => 'Inbox',
|
||||||
'Inbox_size' => 'Your Inbox is %d%% full',
|
'Inbox_size' => 'Your Inbox is %d%% full',
|
||||||
|
@ -169,6 +169,7 @@ $lang += array(
|
|||||||
'MESSAGE_COLOURS' => 'Message Colours',
|
'MESSAGE_COLOURS' => 'Message Colours',
|
||||||
'MESSAGE_HISTORY' => 'Message History',
|
'MESSAGE_HISTORY' => 'Message History',
|
||||||
'MESSAGE_REPORTED_MESSAGE' => 'Reported Message',
|
'MESSAGE_REPORTED_MESSAGE' => 'Reported Message',
|
||||||
|
'MESSAGE_STORED' => 'The message has been send successfully',
|
||||||
'MINIMUM_KARMA' => 'Minimum User Karma',
|
'MINIMUM_KARMA' => 'Minimum User Karma',
|
||||||
'MINIMUM_KARMA_EXPLAIN' => 'Posts by users with Karma less than this will be ignored.',
|
'MINIMUM_KARMA_EXPLAIN' => 'Posts by users with Karma less than this will be ignored.',
|
||||||
'MOVE_DOWN' => 'Move down',
|
'MOVE_DOWN' => 'Move down',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user