Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
792903e6
Unverified
Commit
792903e6
authored
5 years ago
by
Arthur Schiwon
Browse files
Options
Downloads
Patches
Plain Diff
delay sending event from app init to when they are needed
Signed-off-by:
Arthur Schiwon
<
blizzz@arthur-schiwon.de
>
parent
bc409167
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/files_external/lib/AppInfo/Application.php
+0
-6
0 additions, 6 deletions
apps/files_external/lib/AppInfo/Application.php
apps/files_external/lib/Service/BackendService.php
+13
-0
13 additions, 0 deletions
apps/files_external/lib/Service/BackendService.php
with
13 additions
and
6 deletions
apps/files_external/lib/AppInfo/Application.php
+
0
−
6
View file @
792903e6
...
...
@@ -93,12 +93,6 @@ class Application extends App implements IBackendProvider, IAuthMechanismProvide
// force-load auth mechanisms since some will register hooks
// TODO: obsolete these and use the TokenProvider to get the user's password from the session
$this
->
getAuthMechanisms
();
// 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'
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
apps/files_external/lib/Service/BackendService.php
+
13
−
0
View file @
792903e6
...
...
@@ -106,7 +106,18 @@ class BackendService {
$this
->
backendProviders
[]
=
$provider
;
}
private
function
callForRegistrations
()
{
static
$eventSent
=
false
;
if
(
!
$eventSent
)
{
\OC
::
$server
->
getEventDispatcher
()
->
dispatch
(
'OCA\\Files_External::loadAdditionalBackends'
);
$eventSent
=
true
;
}
}
private
function
loadBackendProviders
()
{
$this
->
callForRegistrations
();
foreach
(
$this
->
backendProviders
as
$provider
)
{
$this
->
registerBackends
(
$provider
->
getBackends
());
}
...
...
@@ -124,6 +135,7 @@ class BackendService {
}
private
function
loadAuthMechanismProviders
()
{
$this
->
callForRegistrations
();
foreach
(
$this
->
authMechanismProviders
as
$provider
)
{
$this
->
registerAuthMechanisms
(
$provider
->
getAuthMechanisms
());
}
...
...
@@ -321,6 +333,7 @@ class BackendService {
}
protected
function
loadConfigHandlers
():
void
{
$this
->
callForRegistrations
();
$newLoaded
=
false
;
foreach
(
$this
->
configHandlerLoaders
as
$placeholder
=>
$loader
)
{
$handler
=
$loader
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment