Skip to content
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

Conversation

kyrofa
Copy link
Member

@kyrofa 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.

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 nextcloud#8462

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

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%> (ø) ⬇️

@juliusknorr juliusknorr merged commit 7c6b7b4 into nextcloud:stable12 Feb 27, 2018
@kyrofa kyrofa deleted the backport_12/8462/theming_app_outside_root branch February 27, 2018 16:06
@MorrisJobke MorrisJobke mentioned this pull request Mar 9, 2018
2 tasks
Sign up for free to 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