Revert "#1946 Fix Twig templates logging too much"

This reverts commit 2763b991
This commit is contained in:
Eric
2021-02-25 17:57:39 +01:00
parent 2763b99142
commit 77710f1613

View File

@@ -47,23 +47,19 @@ class TwigHelper
{
$oTwig = self::GetTwigEnvironment($sViewPath);
$oPage->add(self::RenderTemplate($oTwig, $aParams, $sTemplateName, $sDefaultType));
$oPage->add_script(self::RenderTemplate($oTwig, $aParams, $sTemplateName, 'js', false));
$oPage->add_ready_script(self::RenderTemplate($oTwig, $aParams, $sTemplateName, 'ready.js',false));
$oPage->add_script(self::RenderTemplate($oTwig, $aParams, $sTemplateName, 'js'));
$oPage->add_ready_script(self::RenderTemplate($oTwig, $aParams, $sTemplateName, 'ready.js'));
}
/**
* @param \Twig\Environment $oTwig
* @param array $aParams
* @param string $sName
* @param string $sTemplateFileExtension
* @param bool $bLogMissingFile
* @param $aParams
* @param $sName
* @param $sTemplateFileExtension
*
* @return string
* @throws \Twig\Error\LoaderError
* @throws \Twig\Error\RuntimeError
* @throws \Twig\Error\SyntaxError
*/
private static function RenderTemplate(Environment $oTwig, $aParams, $sName, $sTemplateFileExtension, $bLogMissingFile = true)
private static function RenderTemplate(Environment $oTwig, $aParams, $sName, $sTemplateFileExtension)
{
try
{
@@ -75,7 +71,7 @@ class TwigHelper
{
IssueLog::Error($e->getMessage());
}
elseif ($bLogMissingFile)
else
{
IssueLog::Debug($e->getMessage());
}