Fix JS dictionaries not being load in \WebPage

This commit is contained in:
Molkobain
2021-06-30 17:04:03 +02:00
parent 3cd03729b9
commit 9048d09bf6

View File

@@ -1087,6 +1087,11 @@ class WebPage implements Page
header($sHeader);
}
// Compute and add dict entries for JS
if ($this->bAddJSDict) {
$this->output_dict_entries();
}
$s_captured_output = $this->ob_get_clean_safe();
$aData = [];
@@ -1129,16 +1134,6 @@ class WebPage implements Page
$aData['aPage']['sFaviconUrl'] = $this->GetFaviconAbsoluteUrl();
}
// Dict entries for JS
// if ($this->bAddJSDict) {
// $this->output_dict_entries();
// }
// if (trim($s_captured_output) != "") {
// echo "<div class=\"raw_output\">".utils::FilterXSS($s_captured_output)."</div>\n";
// }
$oTwigEnv = TwigHelper::GetTwigEnvironment(BlockRenderer::TWIG_BASE_PATH, BlockRenderer::TWIG_ADDITIONAL_PATHS);
// Render final TWIG into global HTML
$oKpi = new ExecutionKPI();
@@ -1150,7 +1145,6 @@ class WebPage implements Page
echo $sHtml;
$oKpi->ComputeAndReport('Echoing ('.round(strlen($sHtml) / 1024).' Kb)');
if (class_exists('DBSearch')) {
DBSearch::RecordQueryTrace();
}