From 99777f5977ef50d1b8757bf0fc1e539e5e8a5afb Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Mon, 29 Jul 2019 16:30:14 -0600 Subject: [PATCH] Fix issue with AJAX framework load order on the frontend. Partially reverts https://github.com/octobercms/october/commit/f4e50ddd1ad8fe4fa54fcac2c513bd630c650407 in response to https://github.com/octobercms/october/pull/4285#issuecomment-513566437. Functionality can be re-added at a later date under an optional parameter added to the {% framework %} tag. Replaces https://github.com/octobercms/october/pull/4469 --- modules/cms/twig/FrameworkNode.php | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/modules/cms/twig/FrameworkNode.php b/modules/cms/twig/FrameworkNode.php index 5c01fa3bb..9aa2aa04b 100644 --- a/modules/cms/twig/FrameworkNode.php +++ b/modules/cms/twig/FrameworkNode.php @@ -25,7 +25,7 @@ class FrameworkNode extends TwigNode public function compile(TwigCompiler $compiler) { $attrib = $this->getAttribute('name'); - $includeExtras = strtolower(trim($attrib)) == 'extras'; + $includeExtras = strtolower(trim($attrib)) === 'extras'; $compiler ->addDebugInfo($this) @@ -35,38 +35,20 @@ class FrameworkNode extends TwigNode $compiler ->write("if (\$_minify) {" . PHP_EOL) ->indent() - ->write("echo ''.PHP_EOL;" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) - + ->write("echo ''.PHP_EOL;" . PHP_EOL) ->outdent() ->write("}" . PHP_EOL) ->write("else {" . PHP_EOL) ->indent() - ->write("echo ''.PHP_EOL;" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) - + ->write("echo ''.PHP_EOL;" . PHP_EOL) + ->write("echo ''.PHP_EOL;" . PHP_EOL) ->outdent() ->write("}" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) - ->write("echo ''.PHP_EOL;" . PHP_EOL) + ->write("echo ''.PHP_EOL;" . PHP_EOL) ; } else { - $compiler->write("echo ' - '.PHP_EOL;" . PHP_EOL) - ; + $compiler->write("echo ''.PHP_EOL;" . PHP_EOL); } $compiler->write('unset($_minify);' . PHP_EOL);