]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Updater.php
Move user.css to data folder
[github/shaarli/Shaarli.git] / application / Updater.php
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');
+    }
 }
 
 /**