aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/plupload/plupload.php
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-04-09 11:35:19 -0700
committerCesar G <prototech91@gmail.com>2014-04-09 11:38:14 -0700
commita8ec1905e18fda73c440373d696bf9d3b0e06b60 (patch)
tree952da454fcc67b46e0728b8e2dcae92d5381f5bf /phpBB/phpbb/plupload/plupload.php
parent0e3e715a48f99745eab30683b27e953dac07626c (diff)
downloadforums-a8ec1905e18fda73c440373d696bf9d3b0e06b60.tar
forums-a8ec1905e18fda73c440373d696bf9d3b0e06b60.tar.gz
forums-a8ec1905e18fda73c440373d696bf9d3b0e06b60.tar.bz2
forums-a8ec1905e18fda73c440373d696bf9d3b0e06b60.tar.xz
forums-a8ec1905e18fda73c440373d696bf9d3b0e06b60.zip
[ticket/12356] Assign vars preventing Plupload from loading in PM editor.
PHPBB3-12356
Diffstat (limited to 'phpBB/phpbb/plupload/plupload.php')
-rw-r--r--phpBB/phpbb/plupload/plupload.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/phpbb/plupload/plupload.php b/phpBB/phpbb/plupload/plupload.php
index 6bff2b8a7e..b988ce7ce0 100644
--- a/phpBB/phpbb/plupload/plupload.php
+++ b/phpBB/phpbb/plupload/plupload.php
@@ -146,10 +146,11 @@ class plupload
* @param \phpbb\template\template $template
* @param string $s_action The URL to submit the POST data to
* @param int $forum_id The ID of the forum
+ * @param int $max_files Maximum number of files allowed. 0 for unlimited.
*
* @return null
*/
- public function configure(\phpbb\cache\service $cache, \phpbb\template\template $template, $s_action, $forum_id)
+ public function configure(\phpbb\cache\service $cache, \phpbb\template\template $template, $s_action, $forum_id, $max_files)
{
$filters = $this->generate_filter_string($cache, $forum_id);
$chunk_size = $this->get_chunk_size();
@@ -161,6 +162,9 @@ class plupload
'FILTERS' => $filters,
'CHUNK_SIZE' => $chunk_size,
'S_PLUPLOAD_URL' => htmlspecialchars_decode($s_action),
+ 'MAX_ATTACHMENTS' => $max_files,
+ 'ATTACH_ORDER' => ($this->config['display_order']) ? 'asc' : 'desc',
+ 'L_TOO_MANY_ATTACHMENTS' => $this->user->lang('TOO_MANY_ATTACHMENTS', $max_files),
));
$this->user->add_lang('plupload');