From 5650aa981fa0ef7255853cabb431fa6943091770 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 6 Sep 2016 11:43:15 +0200 Subject: [PATCH] Force JavaScript relocation in ACP --- .../install/files/acp/templates/header.tpl | 147 +++++++++--------- .../files/lib/util/HeaderUtil.class.php | 6 + 2 files changed, 78 insertions(+), 75 deletions(-) diff --git a/wcfsetup/install/files/acp/templates/header.tpl b/wcfsetup/install/files/acp/templates/header.tpl index 7badf6ea27..6acdec4e97 100644 --- a/wcfsetup/install/files/acp/templates/header.tpl +++ b/wcfsetup/install/files/acp/templates/header.tpl @@ -35,82 +35,79 @@ }); {js application='wcf' lib='jquery'} diff --git a/wcfsetup/install/files/lib/util/HeaderUtil.class.php b/wcfsetup/install/files/lib/util/HeaderUtil.class.php index ab3c53c286..26741101c4 100644 --- a/wcfsetup/install/files/lib/util/HeaderUtil.class.php +++ b/wcfsetup/install/files/lib/util/HeaderUtil.class.php @@ -2,6 +2,7 @@ namespace wcf\util; use wcf\system\application\ApplicationHandler; use wcf\system\event\EventHandler; +use wcf\system\request\RequestHandler; use wcf\system\request\RouteHandler; use wcf\system\WCF; @@ -105,6 +106,11 @@ final class HeaderUtil { public static function parseOutput($output) { self::$output = $output; + if (RequestHandler::getInstance()->isACPRequest()) { + // force javascript relocation + self::$output = preg_replace('~]*)>~', '