aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/updater
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-01-26 11:15:15 +0100
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit485b168a9677d160b0c0426e4f282b9bd0c632c1 (patch)
treec7c21ea01096bfe28622b3a23c5c76d1cb2435fa /application/updater
parentbee33239ed444f9724422fe5234cd79997500519 (diff)
downloadShaarli-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.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}