Skip to content

Commit

Permalink
changed path in require and added maxconn option (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
helios-ag authored Jan 26, 2020
1 parent 44a2b78 commit e7433a2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Configuration/ElFinderConfigurationReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function getConfiguration(string $instance): array
'uploadAllow' => $parameter['upload_allow'],
'uploadDeny' => $parameter['upload_deny'],
'uploadMaxSize' => $parameter['upload_max_size'],
'uploadMaxConn' => $parameter['upload_max_conn'],
'defaults' => $parameter['defaults'],
'attributes' => $parameter['attributes'],
'acceptedName' => $parameter['accepted_name'],
Expand Down
1 change: 1 addition & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public function getConfigTreeBuilder()
->defaultValue(array('deny', 'allow'))
->end() // upload_order
->scalarNode('upload_max_size')->defaultValue(0)->end()
->integerNode('upload_max_conn')->defaultValue(3)->end()
->arrayNode('defaults')
->useAttributeAsKey('defaults')
->normalizeKeys(false)
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/Elfinder/helper/main.js.twig
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@

// config of RequireJS (REQUIRED)
require.config({
baseUrl : 'bundles/fmelfinder/js',
baseUrl : '/bundles/fmelfinder/js',
paths : {
'jquery' : '//cdnjs.cloudflare.com/ajax/libs/jquery/'+(old? '1.12.4' : jqver)+'/jquery.min',
'jquery-ui': '//cdnjs.cloudflare.com/ajax/libs/jqueryui/'+uiver+'/jquery-ui.min',
Expand Down
4 changes: 4 additions & 0 deletions tests/Configuration/ElFinderConfigurationReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private function getConfigurationReader($attributesObject)
'upload_allow' => '',
'upload_deny' => '',
'upload_max_size' => '',
'upload_max_conn' => 3,
'defaults' => '',
'attributes' => '',
'accepted_name' => '',
Expand Down Expand Up @@ -149,6 +150,7 @@ private function getConfigurationReader($attributesObject)
'upload_allow' => '',
'upload_deny' => '',
'upload_max_size' => '',
'upload_max_conn' => 3,
'defaults' => '',
'attributes' => '',
'accepted_name' => '',
Expand Down Expand Up @@ -201,6 +203,7 @@ private function getConfigurationReader($attributesObject)
'upload_allow' => '',
'upload_deny' => '',
'upload_max_size' => '',
'upload_max_conn' => 3,
'defaults' => '',
'attributes' => '',
'accepted_name' => '',
Expand Down Expand Up @@ -253,6 +256,7 @@ private function getConfigurationReader($attributesObject)
'upload_allow' => '',
'upload_deny' => '',
'upload_max_size' => '',
'upload_max_conn' => 3,
'defaults' => '',
'attributes' => '',
'accepted_name' => '',
Expand Down
1 change: 1 addition & 0 deletions tests/DependencyInjection/ConfigurationLoadTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public function testSupportsAllConfigFormats($path)
'defaults' => array('read' => true, 'write' => true),
'upload_deny' => array('all'),
'upload_max_size' => 0,
'upload_max_conn' => 3,
'dropbox2_settings' => array(
'aliasFormat' => '%s@Dropbox',
'path' => '/',
Expand Down
1 change: 1 addition & 0 deletions tests/Fixtures/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'upload_allow' => array('image/png', 'image/jpg', 'image/jpeg'),
'upload_deny' => array('all'),
'upload_max_size' => 0,
'upload_max_conn' => 3,
'dropbox2_settings' => array(
'app_key' => 'some_consumer',
'app_secret' => 'con$umer',
Expand Down

0 comments on commit e7433a2

Please sign in to comment.