diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-26 11:15:15 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 485b168a9677d160b0c0426e4f282b9bd0c632c1 (patch) | |
tree | c7c21ea01096bfe28622b3a23c5c76d1cb2435fa /application/updater | |
parent | bee33239ed444f9724422fe5234cd79997500519 (diff) | |
download | Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.tar.gz Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.tar.zst Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.zip |
Process picwall rendering through Slim controller + UT
Diffstat (limited to 'application/updater')
-rw-r--r-- | application/updater/Updater.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/application/updater/Updater.php b/application/updater/Updater.php index 95654d81..4bbcb9f2 100644 --- a/application/updater/Updater.php +++ b/application/updater/Updater.php | |||
@@ -2,8 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Shaarli\Updater; | 3 | namespace Shaarli\Updater; |
4 | 4 | ||
5 | use Shaarli\Config\ConfigManager; | ||
6 | use Shaarli\Bookmark\BookmarkServiceInterface; | 5 | use Shaarli\Bookmark\BookmarkServiceInterface; |
6 | use Shaarli\Config\ConfigManager; | ||
7 | use Shaarli\Updater\Exception\UpdaterException; | 7 | use Shaarli\Updater\Exception\UpdaterException; |
8 | 8 | ||
9 | /** | 9 | /** |
@@ -111,4 +111,20 @@ class Updater | |||
111 | { | 111 | { |
112 | return $this->doneUpdates; | 112 | return $this->doneUpdates; |
113 | } | 113 | } |
114 | |||
115 | /** | ||
116 | * With the Slim routing system, default header link should be `./` instead of `?`. | ||
117 | * Otherwise you can not go back to the home page. Example: `/picture-wall` -> `/picture-wall?` instead of `/`. | ||
118 | */ | ||
119 | public function updateMethodRelativeHomeLink(): bool | ||
120 | { | ||
121 | $link = trim($this->conf->get('general.header_link')); | ||
122 | if ($link[0] === '?') { | ||
123 | $link = './'. ltrim($link, '?'); | ||
124 | |||
125 | $this->conf->set('general.header_link', $link, true, true); | ||
126 | } | ||
127 | |||
128 | return true; | ||
129 | } | ||
114 | } | 130 | } |