From: ArthurHoaro Date: Sat, 14 Jan 2017 15:43:32 +0000 (+0100) Subject: Move user.css to data folder X-Git-Tag: v0.9.0~70^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=7282418baa20861dd8132524bc99be65ed9c1c24;p=github%2Fshaarli%2FShaarli.git Move user.css to data folder --- diff --git a/application/Updater.php b/application/Updater.php index 704ce7ab..eb03c6d3 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -308,6 +308,22 @@ class Updater return true; } + + /** + * Move the file to inc/user.css to data/user.css. + * + * Note: Due to hardcoded paths, it's not unit testable. But one line of code should be fine. + * + * @return bool true if the update is successful, false otherwise. + */ + public function updateMethodMoveUserCss() + { + if (! is_file('inc/user.css')) { + return true; + } + + return rename('inc/user.css', 'data/user.css'); + } } /** diff --git a/tpl/default/includes.html b/tpl/default/includes.html index c3b837f5..17b78b17 100644 --- a/tpl/default/includes.html +++ b/tpl/default/includes.html @@ -8,7 +8,7 @@ -{if="is_file('inc/user.css')"}{/if} +{if="is_file('data/user.css')"}{/if} {loop="$plugins_includes.css_files"} {/loop}