Update administrative theme switching to use the request rather than the legacy current_path().

8.0.x
Jody Hamilton 2012-04-11 16:07:11 -04:00 committed by Larry Garfield
parent 9d4d6b05e5
commit 25ea4a1f4a
1 changed files with 5 additions and 2 deletions

View File

@ -1973,8 +1973,11 @@ function system_add_module_assets() {
* Implements hook_custom_theme().
*/
function system_custom_theme() {
if (user_access('view the administration theme') && path_is_admin(current_path())) {
return variable_get('admin_theme');
if ($request = request()) {
$path = ltrim($request->getPathInfo(), '/');
if (user_access('view the administration theme') && path_is_admin($path)) {
return variable_get('admin_theme');
}
}
}