mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge pull request #395 from DorsetDigital/patch-1
Change source of admin URL in getIsAdmin()
This commit is contained in:
commit
6a8f15a194
@ -62,7 +62,7 @@ class InitStateMiddleware implements HTTPMiddleware
|
||||
public function getIsAdmin(HTTPRequest $request)
|
||||
{
|
||||
$adminPaths = static::config()->get('admin_url_paths');
|
||||
$adminPaths[] = AdminRootController::config()->get('url_base') . '/';
|
||||
$adminPaths[] = AdminRootController::admin_url();
|
||||
$currentPath = rtrim($request->getURL(), '/') . '/';
|
||||
foreach ($adminPaths as $adminPath) {
|
||||
if (substr($currentPath, 0, strlen($adminPath)) === $adminPath) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user