mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 10:16:36 +02:00
[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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user