diff options
Diffstat (limited to 'application/updater/Updater.php')
-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 | } |