aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp/ucp_pm_compose.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-04-17 13:09:50 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-04-17 13:09:50 +0000
commita0f8e1323a0fb50e6a4b7449f93b493377eddd2c (patch)
treead60ba619c483e390bf767c70ff7c160e087daf5 /phpBB/includes/ucp/ucp_pm_compose.php
parent8c2f02ca00b41d7aa3282aaacfbf2674a5347a14 (diff)
downloadforums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.gz
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.bz2
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.tar.xz
forums-a0f8e1323a0fb50e6a4b7449f93b493377eddd2c.zip
- clean up marklist calls (global function)
- added new feature: test out others permissions (admin permissions will not be copied) - changed attachment processing by directly using the template engine - fixed some attachment related bugs - additional tiny fixes git-svn-id: file:///svn/phpbb/trunk@5790 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp/ucp_pm_compose.php')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php74
1 files changed, 38 insertions, 36 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index 30e4c06f77..ffe668d056 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -73,8 +73,8 @@ function compose_pm($id, $mode, $action)
{
trigger_error('NO_AUTH_SEND_MESSAGE');
}
+ break;
- break;
case 'reply':
case 'quote':
case 'forward':
@@ -112,7 +112,7 @@ function compose_pm($id, $mode, $action)
AND t.msg_id = p.msg_id
AND p.msg_id = $msg_id";
}
- break;
+ break;
case 'edit':
if (!$msg_id)
@@ -127,7 +127,7 @@ function compose_pm($id, $mode, $action)
AND t.folder_id = ' . PRIVMSGS_OUTBOX . "
AND t.msg_id = $msg_id
AND t.msg_id = p.msg_id";
- break;
+ break;
case 'delete':
if (!$auth->acl_get('u_pm_delete'))
@@ -144,11 +144,11 @@ function compose_pm($id, $mode, $action)
FROM ' . PRIVMSGS_TO_TABLE . '
WHERE user_id = ' . $user->data['user_id'] . "
AND msg_id = $msg_id";
- break;
+ break;
case 'smilies':
generate_smilies('window', 0);
- break;
+ break;
default:
trigger_error('NO_ACTION_MODE');
@@ -175,42 +175,46 @@ function compose_pm($id, $mode, $action)
$db->sql_freeresult($result);
- $msg_id = (int) $post['msg_id'];
- $enable_urls = $post['enable_magic_url'];
- $enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
-
- $message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
- $message_text = $post['message_text'];
- $message_subject = $post['message_subject'];
- $quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
-
- $message_time = $post['message_time'];
- $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'];
+ $msg_id = (int) $post['msg_id'];
+ $folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0;
+ $message_text = (isset($post['message_text'])) ? $post['message_text'] : '';
if (!$post['author_id'] && $msg_id)
{
trigger_error('NO_AUTHOR');
}
- if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
+ if ($action != 'delete')
{
- $address_list = array('u' => array($post['author_id'] => 'to'));
- }
- else if ($action == 'edit' && !sizeof($address_list) && !$refresh && !$submit && !$preview)
- {
- // Rebuild TO and BCC Header
- $address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
- }
+ $enable_urls = $post['enable_magic_url'];
+ $enable_sig = (isset($post['enable_sig'])) ? $post['enable_sig'] : 0;
- if ($action == 'quotepost')
- {
- $check_value = 0;
- }
- else
- {
- $check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
+ $message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
+ $message_subject = $post['message_subject'];
+ $message_time = $post['message_time'];
+ $bbcode_uid = $post['bbcode_uid'];
+
+ $quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
+ $icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
+
+ if (($action == 'reply' || $action == 'quote' || $action == 'quotepost') && !sizeof($address_list) && !$refresh && !$submit && !$preview)
+ {
+ $address_list = array('u' => array($post['author_id'] => 'to'));
+ }
+ else if ($action == 'edit' && !sizeof($address_list) && !$refresh && !$submit && !$preview)
+ {
+ // Rebuild TO and BCC Header
+ $address_list = rebuild_header(array('to' => $post['to_address'], 'bcc' => $post['bcc_address']));
+ }
+
+ if ($action == 'quotepost')
+ {
+ $check_value = 0;
+ }
+ else
+ {
+ $check_value = (($post['enable_bbcode']+1) << 8) + (($post['enable_smilies']+1) << 4) + (($enable_urls+1) << 2) + (($post['enable_sig']+1) << 1);
+ }
}
}
else
@@ -247,8 +251,6 @@ function compose_pm($id, $mode, $action)
$icon_id = 0;
}
-
-
$message_parser = new parse_message();
$message_parser->message = ($action == 'reply') ? '' : $message_text;
@@ -547,7 +549,7 @@ function compose_pm($id, $mode, $action)
$extensions = $update_count = array();
$template->assign_var('S_HAS_ATTACHMENTS', true);
- display_attachments(0, 'attachment', $message_parser->attachment_data, $update_count, true);
+ display_attachments(0, 'attachment', $message_parser->attachment_data, $update_count);
}
$preview_subject = censor_text($subject);