Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
domain
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
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
project
domain
Commits
4d244cd2
Commit
4d244cd2
authored
7 months ago
by
Florian Weber
Committed by
Ken Rickard
7 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3405191
by webflo, agentrickard: Avoid loading all domains in DomainStorage::create
parent
9a2032f2
No related branches found
No related tags found
1 merge request
!60
Avoid loading all domains
Pipeline
#212968
passed
7 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
domain/src/DomainStorage.php
+2
-2
2 additions, 2 deletions
domain/src/DomainStorage.php
with
2 additions
and
2 deletions
domain/src/DomainStorage.php
+
2
−
2
View file @
4d244cd2
...
...
@@ -153,7 +153,7 @@ class DomainStorage extends ConfigEntityStorage implements DomainStorageInterfac
*/
public
function
create
(
array
$values
=
[])
{
$default
=
$this
->
loadDefaultId
();
$
domains
=
$this
->
loadMultipl
e
();
$
count
=
$this
->
getQuery
()
->
accessCheck
(
FALSE
)
->
count
()
->
execut
e
();
if
(
empty
(
$values
))
{
$values
[
'hostname'
]
=
$this
->
createHostname
();
$values
[
'name'
]
=
\Drupal
::
config
(
'system.site'
)
->
get
(
'name'
);
...
...
@@ -161,7 +161,7 @@ class DomainStorage extends ConfigEntityStorage implements DomainStorageInterfac
$values
+=
[
'scheme'
=>
$this
->
getDefaultScheme
(),
'status'
=>
'1'
,
'weight'
=>
count
(
$domains
)
+
1
,
'weight'
=>
$
count
+
1
,
'is_default'
=>
(
int
)
empty
(
$default
),
];
$domain
=
parent
::
create
(
$values
);
...
...
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