]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Move user.css to data folder 753/head
authorArthurHoaro <arthur@hoa.ro>
Sat, 14 Jan 2017 15:43:32 +0000 (16:43 +0100)
committerArthurHoaro <arthur@hoa.ro>
Sat, 14 Jan 2017 15:43:32 +0000 (16:43 +0100)
application/Updater.php
tpl/default/includes.html

index 704ce7ab1282ea7a4a262bad13a9c124d4be4750..eb03c6d3afe6cc6be66062fb2050ac6dfe3170b5 100644 (file)
@@ -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');
+    }
 }
 
 /**
index c3b837f5de350bb683804f1f408767d4afafcf27..17b78b17ccda034cf074c4a175e07ce843b9b15a 100644 (file)
@@ -8,7 +8,7 @@
 <link href="images/favicon.ico#" rel="shortcut icon" type="image/x-icon" />
 <link type="text/css" rel="stylesheet" href="css/reset.css" />
 <link type="text/css" rel="stylesheet" href="css/shaarli.css" />
-{if="is_file('inc/user.css')"}<link type="text/css" rel="stylesheet" href="inc/user.css#" />{/if}
+{if="is_file('data/user.css')"}<link type="text/css" rel="stylesheet" href="data/user.css#" />{/if}
 {loop="$plugins_includes.css_files"}
 <link type="text/css" rel="stylesheet" href="{$value}#"/>
 {/loop}