aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-10-11 17:40:16 +0200
committerAndreas Fischer <bantu@phpbb.com>2013-10-11 17:40:16 +0200
commit2050a39da793b9ed219beed868ec86ebade423f6 (patch)
tree78d20feb7ccc0a0230653aac1518272328d157a5 /phpBB/includes/ucp
parent659236a32f58946a501d3fb9f04ba83ed91ef369 (diff)
downloadforums-2050a39da793b9ed219beed868ec86ebade423f6.tar
forums-2050a39da793b9ed219beed868ec86ebade423f6.tar.gz
forums-2050a39da793b9ed219beed868ec86ebade423f6.tar.bz2
forums-2050a39da793b9ed219beed868ec86ebade423f6.tar.xz
forums-2050a39da793b9ed219beed868ec86ebade423f6.zip
[feature/plupload/integration] Integration of Plupload
This commit is a highly-refactored and up-to-date version of Fyorl's work which was part of his Google Summer of Code 2012 project "Attachment Improvements". PHPBB3-10929
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_pm_compose.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php
index e0e7a46494..87dfdf902b 100644
--- a/phpBB/includes/ucp/ucp_pm_compose.php
+++ b/phpBB/includes/ucp/ucp_pm_compose.php
@@ -21,9 +21,10 @@ if (!defined('IN_PHPBB'))
*/
function compose_pm($id, $mode, $action, $user_folders = array())
{
- global $template, $db, $auth, $user;
+ global $template, $db, $auth, $user, $cache;
global $phpbb_root_path, $phpEx, $config;
global $request;
+ global $phpbb_container;
// Damn php and globals - i know, this is horrible
// Needed for handle_message_list_actions()
@@ -385,6 +386,8 @@ function compose_pm($id, $mode, $action, $user_folders = array())
}
$message_parser = new parse_message();
+ $plupload = $phpbb_container->get('plupload');
+ $message_parser->set_plupload($plupload);
$message_parser->message = ($action == 'reply') ? '' : $message_text;
unset($message_text);
@@ -1099,6 +1102,11 @@ function compose_pm($id, $mode, $action, $user_folders = array())
// Show attachment box for adding attachments if true
$allowed = ($auth->acl_get('u_pm_attach') && $config['allow_pm_attach'] && $form_enctype);
+ if ($allowed)
+ {
+ $plupload->configure($cache, $template, $s_action, false);
+ }
+
// Attachment entry
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);