Support redirection of legacy route 'do=configure'
This commit is contained in:
parent
9e2d47e519
commit
11aa4a7a29
2 changed files with 19 additions and 0 deletions
|
@ -132,4 +132,21 @@ protected function feed(Request $request, Response $response, string $feedType):
|
||||||
|
|
||||||
return $this->redirect($response, '/feed/' . $feedType . $parameters);
|
return $this->redirect($response, '/feed/' . $feedType . $parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Legacy route: ?do=configure */
|
||||||
|
protected function configure(Request $request, Response $response): Response
|
||||||
|
{
|
||||||
|
$route = '/admin/configure';
|
||||||
|
|
||||||
|
if (!$this->container->loginManager->isLoggedIn()) {
|
||||||
|
return $this->redirect($response, '/login?returnurl=' . $this->getBasePath() . $route);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->redirect($response, $route);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getBasePath(): string
|
||||||
|
{
|
||||||
|
return $this->container->basePath ?: '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,8 @@ public function getProcessProvider(): array
|
||||||
['opensearch', [], '/open-search', true],
|
['opensearch', [], '/open-search', true],
|
||||||
['dailyrss', [], '/daily-rss', false],
|
['dailyrss', [], '/daily-rss', false],
|
||||||
['dailyrss', [], '/daily-rss', true],
|
['dailyrss', [], '/daily-rss', true],
|
||||||
|
['configure', [], '/login?returnurl=/subfolder/admin/configure', false],
|
||||||
|
['configure', [], '/admin/configure', true],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue