diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-01-14 17:56:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-14 17:56:28 +0100 |
commit | 37ab940599d40472c5b4a3bbe5a10515046c64ee (patch) | |
tree | 15886b23a1223128ee9a416f4123e456bb49d531 | |
parent | 3ee5c69777af4d5b20cfd8e89e1cc3cf13f640eb (diff) | |
parent | 7282418baa20861dd8132524bc99be65ed9c1c24 (diff) | |
download | Shaarli-37ab940599d40472c5b4a3bbe5a10515046c64ee.tar.gz Shaarli-37ab940599d40472c5b4a3bbe5a10515046c64ee.tar.zst Shaarli-37ab940599d40472c5b4a3bbe5a10515046c64ee.zip |
Merge pull request #753 from ArthurHoaro/usercss
Move user.css to data folder
-rw-r--r-- | application/Updater.php | 16 | ||||
-rw-r--r-- | tpl/default/includes.html | 2 |
2 files changed, 17 insertions, 1 deletions
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 | |||
308 | 308 | ||
309 | return true; | 309 | return true; |
310 | } | 310 | } |
311 | |||
312 | /** | ||
313 | * Move the file to inc/user.css to data/user.css. | ||
314 | * | ||
315 | * Note: Due to hardcoded paths, it's not unit testable. But one line of code should be fine. | ||
316 | * | ||
317 | * @return bool true if the update is successful, false otherwise. | ||
318 | */ | ||
319 | public function updateMethodMoveUserCss() | ||
320 | { | ||
321 | if (! is_file('inc/user.css')) { | ||
322 | return true; | ||
323 | } | ||
324 | |||
325 | return rename('inc/user.css', 'data/user.css'); | ||
326 | } | ||
311 | } | 327 | } |
312 | 328 | ||
313 | /** | 329 | /** |
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 @@ | |||
8 | <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> | 8 | <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" /> |
9 | <link type="text/css" rel="stylesheet" href="css/reset.css" /> | 9 | <link type="text/css" rel="stylesheet" href="css/reset.css" /> |
10 | <link type="text/css" rel="stylesheet" href="css/shaarli.css" /> | 10 | <link type="text/css" rel="stylesheet" href="css/shaarli.css" /> |
11 | {if="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="inc/user.css#" />{/if} | 11 | {if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if} |
12 | {loop="$plugins_includes.css_files"} | 12 | {loop="$plugins_includes.css_files"} |
13 | <link type="text/css" rel="stylesheet" href="{$value}#"/> | 13 | <link type="text/css" rel="stylesheet" href="{$value}#"/> |
14 | {/loop} | 14 | {/loop} |