Fix default link and redirection in install controller
This commit is contained in:
parent
8e9169ceba
commit
87ae3c4f08
2 changed files with 4 additions and 4 deletions
|
@ -128,7 +128,7 @@ public function save(Request $request, Response $response): Response
|
||||||
$this->container->conf->get('credentials.salt')
|
$this->container->conf->get('credentials.salt')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->container->conf->set('general.header_link', $this->container->basePath);
|
$this->container->conf->set('general.header_link', $this->container->basePath . '/');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Everything is ok, let's create config file.
|
// Everything is ok, let's create config file.
|
||||||
|
@ -149,7 +149,7 @@ public function save(Request $request, Response $response): Response
|
||||||
[t('Shaarli is now configured. Please login and start shaaring your bookmarks!')]
|
[t('Shaarli is now configured. Please login and start shaaring your bookmarks!')]
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->redirect($response, '/');
|
return $this->redirect($response, '/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function checkPermissions(): bool
|
protected function checkPermissions(): bool
|
||||||
|
|
|
@ -236,7 +236,7 @@ public function testSaveInstallValid(): void
|
||||||
$result = $this->controller->save($request, $response);
|
$result = $this->controller->save($request, $response);
|
||||||
|
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame('/subfolder/', $result->getHeader('location')[0]);
|
static::assertSame('/subfolder/login', $result->getHeader('location')[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -257,7 +257,7 @@ public function testSaveInstallDefaultValues(): void
|
||||||
$result = $this->controller->save($request, $response);
|
$result = $this->controller->save($request, $response);
|
||||||
|
|
||||||
static::assertSame(302, $result->getStatusCode());
|
static::assertSame(302, $result->getStatusCode());
|
||||||
static::assertSame('/subfolder/', $result->getHeader('location')[0]);
|
static::assertSame('/subfolder/login', $result->getHeader('location')[0]);
|
||||||
|
|
||||||
static::assertSame('UTC', $confSettings['general.timezone']);
|
static::assertSame('UTC', $confSettings['general.timezone']);
|
||||||
static::assertSame('Shared bookmarks on http://shaarli', $confSettings['general.title']);
|
static::assertSame('Shared bookmarks on http://shaarli', $confSettings['general.title']);
|
||||||
|
|
Loading…
Reference in a new issue