Commit 87979eaa authored by effulgentsia's avatar effulgentsia Committed by Crell
Browse files

Improve system path handling and use the system path to determine if we need...

Improve system path handling and use the system path to determine if we need to show a custom theme.
parent 7bf2a1ae
......@@ -16,7 +16,8 @@
abstract class PathListenerBase {
public function extractPath(Request $request) {
return $request->attributes->get('system_path') ?: trim($request->getPathInfo(), '/');
$path = $request->attributes->get('system_path');
return isset($path) ? $path : trim($request->getPathInfo(), '/');
}
public function setPath(Request $request, $path) {
......
......@@ -2021,7 +2021,7 @@ function system_add_module_assets() {
*/
function system_custom_theme() {
if ($request = request()) {
$path = ltrim($request->getPathInfo(), '/');
$path = $request->attributes->get('system_path');
if (user_access('view the administration theme') && path_is_admin($path)) {
return variable_get('admin_theme');
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment