]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Updater.php
Merge pull request #771 from ArthurHoaro/master
[github/shaarli/Shaarli.git] / application / Updater.php
index 621c7238336a4e128187ca576b0d2784aaadcf86..eb03c6d3afe6cc6be66062fb2050ac6dfe3170b5 100644 (file)
@@ -69,7 +69,7 @@ class Updater
             return $updatesRan;
         }
 
-        if ($this->methods == null) {
+        if ($this->methods === null) {
             throw new UpdaterException('Couldn\'t retrieve Updater class methods.');
         }
 
@@ -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');
+    }
 }
 
 /**