New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from Feb 27, 2018

Conversation

Projects
None yet
3 participants
@kyrofa
Member

kyrofa commented Feb 26, 2018

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.

theming: handle not being in the serverroot
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.

Fix #8462

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
@codecov

This comment has been minimized.

codecov bot commented Feb 26, 2018

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 Files Coverage Δ Complexity Δ
apps/theming/lib/Controller/ThemingController.php 74.4% <60%> (-0.24%) 34 <0> (ø)
apps/files_trashbin/lib/Expiration.php 90.32% <0%> (-1.62%) 29% <0%> (ø)
apps/files_trashbin/lib/Trashbin.php 72.53% <0%> (+0.24%) 136% <0%> (ø) ⬇️

@juliushaertl juliushaertl merged commit 7c6b7b4 into nextcloud:stable12 Feb 27, 2018

3 checks passed

codecov/patch 60% of diff hit (target 53.84%)
Details
codecov/project Absolute coverage decreased by -<.01% but relative coverage increased by +6.15% compared to ee01068
Details
continuous-integration/drone/pr the build was successful
Details

@kyrofa kyrofa deleted the kyrofa:backport_12/8462/theming_app_outside_root branch Feb 27, 2018

@MorrisJobke MorrisJobke referenced this pull request Mar 9, 2018

Merged

12.0.6 RC 1 #8750

2 of 2 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment