From 792bcb82ae5149c86afcd4d550e3a22d60d330f7 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 13 Feb 2019 00:14:56 +0100 Subject: add LDAP ConfigHandler for external storages and "$home" var * handler registered upon OCA\\Files_External::loadAdditionalBackends event as user_ldap is loaded before files_external * new configuration field "ldapExtStorageHomeAttribute" (not in GUI yet) Signed-off-by: Arthur Schiwon --- apps/files_external/lib/AppInfo/Application.php | 3 ++- apps/files_external/lib/Lib/Storage/FTP.php | 2 -- apps/files_external/lib/Service/BackendService.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/files_external') diff --git a/apps/files_external/lib/AppInfo/Application.php b/apps/files_external/lib/AppInfo/Application.php index 5b12377fdb8..01de6f1e40b 100644 --- a/apps/files_external/lib/AppInfo/Application.php +++ b/apps/files_external/lib/AppInfo/Application.php @@ -94,7 +94,8 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide // TODO: obsolete these and use the TokenProvider to get the user's password from the session $this->getAuthMechanisms(); - // app developers: do NOT depend on this! it will disappear with oC 9.0! + // don't remove this, as app loading order might be a side effect and + // querying the service from the server not reliable \OC::$server->getEventDispatcher()->dispatch( 'OCA\\Files_External::loadAdditionalBackends' ); diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index dc4ab9cb0e1..db2ae9cf298 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -44,8 +44,6 @@ class FTP extends StreamWrapper{ private $secure; private $root; - private static $tempFiles=array(); - public function __construct($params) { if (isset($params['host']) && isset($params['user']) && isset($params['password'])) { $this->host=$params['host']; diff --git a/apps/files_external/lib/Service/BackendService.php b/apps/files_external/lib/Service/BackendService.php index 05bda1998da..3c66e8eb3cd 100644 --- a/apps/files_external/lib/Service/BackendService.php +++ b/apps/files_external/lib/Service/BackendService.php @@ -328,7 +328,7 @@ class BackendService { 'Handler for %s is not an instance of IConfigHandler', $placeholder )); } - $this->configHandlers[] = $handler; + $this->configHandlers[$placeholder] = $handler; $newLoaded = true; } $this->configHandlerLoaders = []; -- cgit v1.2.3