mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-12 03:34:04 +02:00
- tiny bugfixes. ;)
git-svn-id: file:///svn/phpbb/trunk@5296 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -99,7 +99,8 @@ class ucp_pm
|
||||
'CLICK_TO_VIEW' => sprintf($user->lang['CLICK_VIEW_PRIVMSG'], '<a href="' . $phpbb_root_path . 'ucp.' . $phpEx . $SID . '&i=pm&folder=inbox" onclick="jump_to_inbox();return false;" target="_new">', '</a>'),
|
||||
'U_INBOX' => "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&folder=inbox")
|
||||
);
|
||||
|
||||
|
||||
$tpl_file = 'ucp_pm_popup';
|
||||
break;
|
||||
|
||||
// Compose message
|
||||
@@ -155,7 +156,7 @@ class ucp_pm
|
||||
|
||||
case 'unread':
|
||||
case 'view':
|
||||
|
||||
|
||||
$sql = 'SELECT group_message_limit
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
WHERE group_id = ' . $user->data['group_id'];
|
||||
@@ -251,7 +252,7 @@ class ucp_pm
|
||||
}
|
||||
|
||||
$message_row = array();
|
||||
if ($mode == 'view' && $action == 'view_message' && $msg_id)
|
||||
if ($action == 'view_message' && $msg_id)
|
||||
{
|
||||
// Get Message user want to see
|
||||
|
||||
@@ -384,4 +385,35 @@ class ucp_pm
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @package module_install
|
||||
*/
|
||||
class ucp_pm_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'ucp_pm',
|
||||
'title' => 'UCP_PM',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'view' => array('title' => 'UCP_PM_VIEW', 'auth' => 'cfg_allow_privmsg'),
|
||||
'compose' => array('title' => 'UCP_PM_COMPOSE', 'auth' => 'cfg_allow_privmsg'),
|
||||
'unread' => array('title' => 'UCP_PM_UNREAD', 'auth' => 'cfg_allow_privmsg'),
|
||||
'drafts' => array('title' => 'UCP_PM_DRAFTS', 'auth' => 'cfg_allow_privmsg'),
|
||||
'options' => array('title' => 'UCP_PM_OPTIONS', 'auth' => 'cfg_allow_privmsg'),
|
||||
'popup' => array('title' => 'UCP_PM_POPUP_TITLE', 'auth' => 'cfg_allow_privmsg', 'display' => 0),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
function install()
|
||||
{
|
||||
}
|
||||
|
||||
function uninstall()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -99,7 +99,7 @@ function compose_pm($id, $mode, $action)
|
||||
|
||||
if ($action == 'quotepost')
|
||||
{
|
||||
$sql = 'SELECT p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_html, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username
|
||||
$sql = 'SELECT p.post_id as msg_id, p.post_text as message_text, p.poster_id as author_id, p.post_time as message_time, p.bbcode_bitfield, p.bbcode_uid, p.enable_sig, p.enable_html, p.enable_smilies, p.enable_magic_url, t.topic_title as message_subject, u.username as quote_username
|
||||
FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
|
||||
WHERE p.post_id = $msg_id
|
||||
AND t.topic_id = p.topic_id
|
||||
@@ -179,15 +179,17 @@ function compose_pm($id, $mode, $action)
|
||||
|
||||
$msg_id = (int) $post['msg_id'];
|
||||
$enable_urls = $post['enable_magic_url'];
|
||||
$enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
|
||||
|
||||
$message_attachment = $post['message_attachement'];
|
||||
$message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
|
||||
$message_text = $post['message_text'];
|
||||
$message_subject = $post['message_subject'];
|
||||
$quote_username = $post['quote_username'];
|
||||
|
||||
$message_time = $post['message_time'];
|
||||
$icon_id = $post['icon_id'];
|
||||
$folder_id = $post['folder_id'];
|
||||
$icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
|
||||
$folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0;
|
||||
$bbcode_uid = $post['bbcode_uid'];
|
||||
|
||||
if (!$post['author_id'] && $msg_id)
|
||||
{
|
||||
@@ -204,7 +206,14 @@ function compose_pm($id, $mode, $action)
|
||||
$address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
|
||||
}
|
||||
|
||||
$check_value = (($post['enable_html']+1) << 16) + (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
||||
if ($action == 'quotepost')
|
||||
{
|
||||
$check_value = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$check_value = (($post['enable_html']+1) << 16) + (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -308,7 +317,7 @@ function compose_pm($id, $mode, $action)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!in_array($action, array('quote', 'quotepost', 'edit', 'delete', 'forward')))
|
||||
if (!in_array($action, array('quote', 'edit', 'delete', 'forward')))
|
||||
{
|
||||
$enable_sig = ($config['allow_sig'] && $auth->acl_get('u_sig') && $user->optionget('attachsig'));
|
||||
$enable_smilies = ($config['allow_smilies'] && $auth->acl_get('u_pm_smilies') && $user->optionget('smilies'));
|
||||
@@ -578,7 +587,7 @@ function compose_pm($id, $mode, $action)
|
||||
}
|
||||
|
||||
// Decode text for message display
|
||||
$bbcode_uid = (($action == 'quote' || $action == 'forward' || $action == 'quotepost') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid;
|
||||
$bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid;
|
||||
|
||||
$message_parser->decode_message($bbcode_uid);
|
||||
|
||||
@@ -603,7 +612,7 @@ function compose_pm($id, $mode, $action)
|
||||
|
||||
if ($action == 'forward' && !$preview && !$refresh)
|
||||
{
|
||||
$fwd_to_field = write_pm_addresses(array('to' => $to_address), 0, true);
|
||||
$fwd_to_field = write_pm_addresses(array('to' => $post['to_address']), 0, true);
|
||||
|
||||
$forward_text = array();
|
||||
$forward_text[] = $user->lang['FWD_ORIGINAL_MESSAGE'];
|
||||
@@ -612,7 +621,7 @@ function compose_pm($id, $mode, $action)
|
||||
$forward_text[] = sprintf($user->lang['FWD_FROM'], $quote_username);
|
||||
$forward_text[] = sprintf($user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
|
||||
|
||||
$message_parser->message = implode("\n", $forward_text) . "\n\n[quote=\"[url=" . generate_board_url() . "/memberlist.$phpEx$SID&mode=viewprofile&u={$author_id}]{$quote_username}[/url]\"]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
|
||||
$message_parser->message = implode("\n", $forward_text) . "\n\n[quote=\"[url=" . generate_board_url() . "/memberlist.$phpEx$SID&mode=viewprofile&u={$post['author_id']}]{$quote_username}[/url]\"]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
|
||||
$message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user