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
9b7bdfef
Unverified
Commit
9b7bdfef
authored
4 years ago
by
Julius Härtl
Browse files
Options
Downloads
Patches
Plain Diff
Fix setting images through occ for theming
Signed-off-by:
Julius Härtl
<
jus@bitgrid.net
>
parent
0f1cc783
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/theming/lib/Command/UpdateConfig.php
+5
-4
5 additions, 4 deletions
apps/theming/lib/Command/UpdateConfig.php
with
5 additions
and
4 deletions
apps/theming/lib/Command/UpdateConfig.php
+
5
−
4
View file @
9b7bdfef
...
...
@@ -94,7 +94,7 @@ class UpdateConfig extends Command {
return
0
;
}
if
(
!
in_array
(
$key
,
self
::
SUPPORTED_KEYS
,
true
))
{
if
(
!
in_array
(
$key
,
self
::
SUPPORTED_KEYS
,
true
)
&&
!
in_array
(
$key
,
self
::
SUPPORTED_IMAGE_KEYS
,
true
))
{
$output
->
writeln
(
'<error>Invalid config key provided</error>'
);
return
1
;
}
...
...
@@ -116,11 +116,12 @@ class UpdateConfig extends Command {
}
if
(
in_array
(
$key
,
self
::
SUPPORTED_IMAGE_KEYS
,
true
))
{
if
(
file_exists
(
__DIR__
.
$value
))
{
$value
=
__DIR__
.
$value
;
if
(
strpos
(
$value
,
'/'
)
!==
0
)
{
$output
->
writeln
(
'<error>The image file needs to be provided as an absolute path: '
.
$value
.
'.</error>'
);
return
1
;
}
if
(
!
file_exists
(
$value
))
{
$output
->
writeln
(
'<error>File could not be found: '
.
$value
.
'</error>'
);
$output
->
writeln
(
'<error>File could not be found: '
.
$value
.
'
.
</error>'
);
return
1
;
}
$value
=
$this
->
imageManager
->
updateImage
(
$key
,
$value
);
...
...
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