diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-07-24 10:30:47 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-24 10:30:47 +0200 |
commit | 87ae3c4f08431e02869376cb57add257747910d1 (patch) | |
tree | b8d75a44b7adf79fcd6e0ea84fb5c8c7a1e37506 | |
parent | 8e9169cebaf5697344cb373d69fe429e8e0efd5d (diff) | |
download | Shaarli-87ae3c4f08431e02869376cb57add257747910d1.tar.gz Shaarli-87ae3c4f08431e02869376cb57add257747910d1.tar.zst Shaarli-87ae3c4f08431e02869376cb57add257747910d1.zip |
Fix default link and redirection in install controller
-rw-r--r-- | application/front/controller/visitor/InstallController.php | 4 | ||||
-rw-r--r-- | tests/front/controller/visitor/InstallControllerTest.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/application/front/controller/visitor/InstallController.php b/application/front/controller/visitor/InstallController.php index 94ebb4ae..5e3152c7 100644 --- a/application/front/controller/visitor/InstallController.php +++ b/application/front/controller/visitor/InstallController.php | |||
@@ -128,7 +128,7 @@ class InstallController extends ShaarliVisitorController | |||
128 | $this->container->conf->get('credentials.salt') | 128 | $this->container->conf->get('credentials.salt') |
129 | ) | 129 | ) |
130 | ); | 130 | ); |
131 | $this->container->conf->set('general.header_link', $this->container->basePath); | 131 | $this->container->conf->set('general.header_link', $this->container->basePath . '/'); |
132 | 132 | ||
133 | try { | 133 | try { |
134 | // Everything is ok, let's create config file. | 134 | // Everything is ok, let's create config file. |
@@ -149,7 +149,7 @@ class InstallController extends ShaarliVisitorController | |||
149 | [t('Shaarli is now configured. Please login and start shaaring your bookmarks!')] | 149 | [t('Shaarli is now configured. Please login and start shaaring your bookmarks!')] |
150 | ); | 150 | ); |
151 | 151 | ||
152 | return $this->redirect($response, '/'); | 152 | return $this->redirect($response, '/login'); |
153 | } | 153 | } |
154 | 154 | ||
155 | protected function checkPermissions(): bool | 155 | protected function checkPermissions(): bool |
diff --git a/tests/front/controller/visitor/InstallControllerTest.php b/tests/front/controller/visitor/InstallControllerTest.php index 29c4d7a0..089c64ac 100644 --- a/tests/front/controller/visitor/InstallControllerTest.php +++ b/tests/front/controller/visitor/InstallControllerTest.php | |||
@@ -236,7 +236,7 @@ class InstallControllerTest extends TestCase | |||
236 | $result = $this->controller->save($request, $response); | 236 | $result = $this->controller->save($request, $response); |
237 | 237 | ||
238 | static::assertSame(302, $result->getStatusCode()); | 238 | static::assertSame(302, $result->getStatusCode()); |
239 | static::assertSame('/subfolder/', $result->getHeader('location')[0]); | 239 | static::assertSame('/subfolder/login', $result->getHeader('location')[0]); |
240 | } | 240 | } |
241 | 241 | ||
242 | /** | 242 | /** |
@@ -257,7 +257,7 @@ class InstallControllerTest extends TestCase | |||
257 | $result = $this->controller->save($request, $response); | 257 | $result = $this->controller->save($request, $response); |
258 | 258 | ||
259 | static::assertSame(302, $result->getStatusCode()); | 259 | static::assertSame(302, $result->getStatusCode()); |
260 | static::assertSame('/subfolder/', $result->getHeader('location')[0]); | 260 | static::assertSame('/subfolder/login', $result->getHeader('location')[0]); |
261 | 261 | ||
262 | static::assertSame('UTC', $confSettings['general.timezone']); | 262 | static::assertSame('UTC', $confSettings['general.timezone']); |
263 | static::assertSame('Shared bookmarks on http://shaarli', $confSettings['general.title']); | 263 | static::assertSame('Shared bookmarks on http://shaarli', $confSettings['general.title']); |