diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2016-02-08 13:16:00 +0000 |
---|---|---|
committer | Robin McCorkell <robin@mccorkell.me.uk> | 2016-05-03 11:30:02 +0100 |
commit | de98a6e54cd2d732e0b7c1297e8da43e53bb97c7 (patch) | |
tree | d181a50261fea23ee4366bb70da0f6d02c03d834 /apps/files_external/templates | |
parent | 06293783e0d291a5595b55a3268d8bc0704277db (diff) | |
download | nextcloud-server-de98a6e54cd2d732e0b7c1297e8da43e53bb97c7.tar.gz nextcloud-server-de98a6e54cd2d732e0b7c1297e8da43e53bb97c7.zip |
Allow multiple custom JS files
Diffstat (limited to 'apps/files_external/templates')
-rw-r--r-- | apps/files_external/templates/settings.php | 12 |
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); } } |