fix(views): legacy guard for pre-Prompt-M DB rows without theme reset

A DB row from before Prompt M still carries the old on/off keys
(brandlogo/centerlogo/rightlogo). When the theme files are updated WITHOUT
a theme reset, such a row (e.g. centerlogo=off with a non-empty old
centerlogofile) would show that logo under the new file-only logic. The
views now also honor the legacy key when present: <pos>logo == 'off' keeps
the logo hidden (|default('on') after a reset, where the key is gone).
Fresh installs are unaffected: all new keys have config.xml defaults and
the views fall back via |default when keys are absent.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-24 23:23:59 +01:00
commit cea02487c7

View file

@ -92,7 +92,7 @@ NOTE: Feel free to ask for functions, variables, etc, that you feel are missing
{{ include('./subviews/header/head.twig') }}
<body
class=" {{ aSurveyInfo.class.body }} font-{{ aSurveyInfo.options.font }} lang-{{ aSurveyInfo.languagecode }} {{ aSurveyInfo.surveyformat }} {% if( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit']) %}brand-logo{% endif %}" {{ aSurveyInfo.attr.body }} >
class=" {{ aSurveyInfo.class.body }} font-{{ aSurveyInfo.options.font }} lang-{{ aSurveyInfo.languagecode }} {{ aSurveyInfo.surveyformat }} {% if( aSurveyInfo.options.brandlogofile|default('off') not in ['off', '', 'inherit'] and aSurveyInfo.options.brandlogo|default('on') != 'off') %}brand-logo{% endif %}" {{ aSurveyInfo.attr.body }} >
{# This used for the pjax system #}
<div id="beginScripts">