diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-07-28 22:24:41 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-28 22:34:45 +0200 |
commit | f7f08ceec1b218e1525153e8bd3d0199f2fb1c9d (patch) | |
tree | f0c1227355b02ab931732b0b37b626f3ec9274cf /application | |
parent | 624123177f8673f978c49186b43fd96c6827d8a0 (diff) | |
download | Shaarli-f7f08ceec1b218e1525153e8bd3d0199f2fb1c9d.tar.gz Shaarli-f7f08ceec1b218e1525153e8bd3d0199f2fb1c9d.tar.zst Shaarli-f7f08ceec1b218e1525153e8bd3d0199f2fb1c9d.zip |
Fix basePath in unit tests reference DB
Diffstat (limited to 'application')
-rw-r--r-- | application/front/ShaarliMiddleware.php | 1 | ||||
-rw-r--r-- | application/updater/Updater.php | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/application/front/ShaarliMiddleware.php b/application/front/ShaarliMiddleware.php index 92c0e911..707489d0 100644 --- a/application/front/ShaarliMiddleware.php +++ b/application/front/ShaarliMiddleware.php | |||
@@ -93,6 +93,7 @@ class ShaarliMiddleware | |||
93 | return; | 93 | return; |
94 | } | 94 | } |
95 | 95 | ||
96 | $this->container->updater->setBasePath($this->container->basePath); | ||
96 | $newUpdates = $this->container->updater->update(); | 97 | $newUpdates = $this->container->updater->update(); |
97 | if (!empty($newUpdates)) { | 98 | if (!empty($newUpdates)) { |
98 | $this->container->updater->writeUpdates( | 99 | $this->container->updater->writeUpdates( |
diff --git a/application/updater/Updater.php b/application/updater/Updater.php index 4c578528..88a7bc7b 100644 --- a/application/updater/Updater.php +++ b/application/updater/Updater.php | |||
@@ -157,7 +157,7 @@ class Updater | |||
157 | && 1 === preg_match('/^\?([a-zA-Z0-9-_@]{6})($|&|#)/', $bookmark->getUrl(), $match) | 157 | && 1 === preg_match('/^\?([a-zA-Z0-9-_@]{6})($|&|#)/', $bookmark->getUrl(), $match) |
158 | ) { | 158 | ) { |
159 | $updated = true; | 159 | $updated = true; |
160 | $bookmark = $bookmark->setUrl($this->basePath . '/shaare/' . $match[1]); | 160 | $bookmark = $bookmark->setUrl('/shaare/' . $match[1]); |
161 | 161 | ||
162 | $this->bookmarkService->set($bookmark, false); | 162 | $this->bookmarkService->set($bookmark, false); |
163 | } | 163 | } |