X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUpdater.php;h=eb03c6d3afe6cc6be66062fb2050ac6dfe3170b5;hb=37ab940599d40472c5b4a3bbe5a10515046c64ee;hp=621c7238336a4e128187ca576b0d2784aaadcf86;hpb=04a0e8ea34c241fdf6bd30b11f5242656f9cd1c2;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Updater.php b/application/Updater.php index 621c7238..eb03c6d3 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -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'); + } } /**