From 7282418baa20861dd8132524bc99be65ed9c1c24 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sat, 14 Jan 2017 16:43:32 +0100 Subject: [PATCH] Move user.css to data folder --- application/Updater.php | 16 ++++++++++++++++ tpl/default/includes.html | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/application/Updater.php b/application/Updater.php index 704ce7a..eb03c6d 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 c3b837f..17b78b1 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}