Skip to content

[stable12] theming: handle not being in the serverroot - #8549

Merged
juliusknorr merged 1 commit into
nextcloud:stable12from
kyrofa:backport_12/8462/theming_app_outside_root
Feb 27, 2018
Merged

[stable12] theming: handle not being in the serverroot#8549
juliusknorr merged 1 commit into
nextcloud:stable12from
kyrofa:backport_12/8462/theming_app_outside_root

Conversation

@kyrofa

Copy link
Copy Markdown
Member

This PR is a backport of #8463 for v12.

Currently, the theming app assumes it's in the serverroot. However, with Nextcloud's flexibility regarding configurable app paths, this is not a safe assumption to make. If it happens to be an incorrect assumption, the theming app fails to work.

Instead of relying on the serverroot, just use the path from the AppManager and utilize relative paths for assets from there.

Currently, the theming app assumes it's in the serverroot. However, with
Nextcloud's flexibility regarding configurable app paths, this is not a
safe assumption to make. If it happens to be an incorrect assumption,
the theming app fails to work.
Instead of relying on the serverroot, just use the path from the
AppManager and utilize relative paths for assets from there.
Fixnextcloud#8462
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@codecov

codecovBot commented Feb 26, 2018

Copy link
Copy Markdown

Codecov Report

Merging #8549 into stable12 will decrease coverage by <.01%.
The diff coverage is 60%.

@@ Coverage Diff @@## stable12 #8549 +/- ##
==============================================
- Coverage 53.84% 53.84% -0.01% 
Complexity 22757 22757 ==============================================
Files 1386 1386 Lines 87141 87143 +2 Branches 1331 1331 ==============================================
+ Hits 46919 46920 +1 - Misses 40222 40223 +1
Impacted FilesCoverage ΔComplexity Δ
apps/theming/lib/Controller/ThemingController.php74.4% <60%> (-0.24%)34 <0> (ø)
apps/files_trashbin/lib/Expiration.php90.32% <0%> (-1.62%)29% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php72.53% <0%> (+0.24%)136% <0%> (ø)⬇️

@juliusknorr
juliusknorr merged commit 7c6b7b4 into nextcloud:stable12Feb 27, 2018
@kyrofa
kyrofa deleted the backport_12/8462/theming_app_outside_root branch February 27, 2018 16:06
@MorrisJobkeMorrisJobke mentioned this pull request Mar 9, 2018
2 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kyrofa@juliusknorr@skjnldsv