aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/updater/Updater.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/updater/Updater.php')
-rw-r--r--application/updater/Updater.php18
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
3namespace Shaarli\Updater; 3namespace Shaarli\Updater;
4 4
5use Shaarli\Config\ConfigManager;
6use Shaarli\Bookmark\BookmarkServiceInterface; 5use Shaarli\Bookmark\BookmarkServiceInterface;
6use Shaarli\Config\ConfigManager;
7use Shaarli\Updater\Exception\UpdaterException; 7use 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}