Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2016-02-08 16:16:00 +0300
committerRobin McCorkell <robin@mccorkell.me.uk>2016-05-03 13:30:02 +0300
commitde98a6e54cd2d732e0b7c1297e8da43e53bb97c7 (patch)
treed181a50261fea23ee4366bb70da0f6d02c03d834 /apps/files_external/templates
parent06293783e0d291a5595b55a3268d8bc0704277db (diff)
Allow multiple custom JS files
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r--apps/files_external/templates/settings.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files_external/templates/settings.php b/apps/files_external/templates/settings.php
index 7edd66fe4d5..c9cc40b0ba0 100644
--- a/apps/files_external/templates/settings.php
+++ b/apps/files_external/templates/settings.php
@@ -1,5 +1,6 @@
<?php
use \OCA\Files_External\Lib\Backend\Backend;
+ use \OCA\Files_External\Lib\Auth\AuthMechanism;
use \OCA\Files_External\Lib\DefinitionParameter;
use \OCA\Files_External\Service\BackendService;
@@ -16,13 +17,16 @@
// load custom JS
foreach ($_['backends'] as $backend) {
/** @var Backend $backend */
- if ($backend->getCustomJs()) {
- script('files_external', $backend->getCustomJs());
+ $scripts = $backend->getCustomJs();
+ foreach ($scripts as $script) {
+ script('files_external', $script);
}
}
foreach ($_['authMechanisms'] as $authMechanism) {
- if ($authMechanism->getCustomJs()) {
- script('files_external', $authMechanism->getCustomJs());
+ /** @var AuthMechanism $authMechanism */
+ $scripts = $authMechanism->getCustomJs();
+ foreach ($scripts as $script) {
+ script('files_external', $script);
}
}