Commit 5e0de2b9 authored by Benjamin Sigonneau's avatar Benjamin Sigonneau
Browse files

[PHP 7.2 compatibility] Fix unquoted strings

PHP 7.2 migration notes state that:

> Unquoted strings that are non-existent global constants are taken to
> be strings of themselves. This behaviour used to emit an E_NOTICE,
> but will now emit an E_WARNING. In the next major version of PHP, an
> Error exception will be thrown instead.

There were various unquoted strings (used as array keys) in templates.
As a consequence, those templates could not be rendered with PHP 7.2,
and a 500 error was issued instead.
parent 949d5074
......@@ -13,22 +13,22 @@
<div class="relative moduleSelectorContainer {{@module[tags]}}">
<div class="relative moduleSelectorContainer {{@module['tags']}}">
<div class="infoModuleBtn absolute " style="top: 8px; left: 8px ; z-index: 6100; cursor: help">
<i class="material-icons frama-orange-text tooltipped" data-position="right"
data-delay="50" data-tooltip="{{@module[description]}}">info_outline</i>
data-delay="50" data-tooltip="{{@module['description']}}">info_outline</i>
<div class="row parent-hover relative white hoverBorderInBox chooseModuleBtn light-shadow " style="break-inside: avoid-column !important;
-webkit-column-break-inside: avoid !important; cursor: pointer; margin-bottom: 30px; padding: 6px !important; overflow: visible" id="chooseModuleBtn-{{@module[name]}}">
-webkit-column-break-inside: avoid !important; cursor: pointer; margin-bottom: 30px; padding: 6px !important; overflow: visible" id="chooseModuleBtn-{{@module['name']}}">
<div class="row no-margin frama-purple-text ">
<h5 class="center-align no-margin" style="padding: 5px 0 10px 0">
<div class="row no-margin no-padding ">
<img src="app/views/modules/{{@module[name]}}/preview.png" class="responsive-img no-margin" style=" background-color: rgb(255,255,255); !important; ; padding: 0 5px">
<img src="app/views/modules/{{@module['name']}}/preview.png" class="responsive-img no-margin" style=" background-color: rgb(255,255,255); !important; ; padding: 0 5px">
<span class="btn-floating waves-effect waves-light children-hover frama-orange absolute" style="bottom: -20px; left: 50%; margin-left: -20px"><i class="material-icons">add</i></span>
......@@ -42,4 +42,4 @@
<include href="./base/editBtns/addSectionForm.htm"/>
\ No newline at end of file
<include href="./base/editBtns/addSectionForm.htm"/>
......@@ -6,7 +6,7 @@
SiteOptions = {{@siteOptionsJson |raw}};
CSRFToken= '{{@SESSION[CSRFToken]}}'
CSRFToken= '{{@SESSION['CSRFToken']}}'
isAdminPage ="{{@isAdminPage}}"
scrollFireOptions = []
......@@ -28,7 +28,7 @@
<repeat group="{{ @siteStructure }}" value="{{ @section }}">
<check if="{{ @section['inMenuAs'] }}">
<li class="relative ">
<a href="#{{@section[id]}}" class="second-color main-font" style="font-size: larger">{{@section['inMenuAs']}}</a>
<a href="#{{@section['id']}}" class="second-color main-font" style="font-size: larger">{{@section['inMenuAs']}}</a>
<check if="{{ @isAdmin && @isAdminPage }}">
<a href="#!" class="btn-floating waves-effect waves-light frama-orange hover-frama-purple absolute tooltipped show-on-li-hover editMenuLabel" data-position="right"
data-delay="350" data-tooltip="Modifier" style="top: 3px; left: -20px; z-index: 1500 !important;" id="editMenuLabel-{{@section['id']}}-{{@section['inMenuAs']}}"><i class="material-icons">edit</i></a>
......@@ -54,7 +54,7 @@
<repeat group="{{ @siteStructure }}" value="{{ @section }}">
<check if="{{ @section['inMenuAs'] }}">
<li class="relative " style="margin-top: -10px">
<a href="#{{@section[id]}}" class="second-color main-font navItems" style="font-size: larger">{{@section['inMenuAs']}}</a>
<a href="#{{@section['id']}}" class="second-color main-font navItems" style="font-size: larger">{{@section['inMenuAs']}}</a>
......@@ -65,4 +65,4 @@
\ No newline at end of file
......@@ -2,8 +2,8 @@
<input type="text" class="displaynone" name="CSRFToken" value="{{@CSRFToken}}">
<input type="text" name ="hash" class="displaynone">
<repeat group="{{ @siteStructure }}" value="{{ @section }}">
<repeat group="{{ @section[fields] }}" key=" {{@fieldName}}" value="{{ @field }}">
<input name="{{'uglyForm-'.@section[id] . '-' .@fieldName}}" type="{{@field[type]}}" value="{{@field[value]}}">
<repeat group="{{ @section['fields'] }}" key=" {{@fieldName}}" value="{{ @field }}">
<input name="{{'uglyForm-'.@section['id'] . '-' .@fieldName}}" type="{{@field['type']}}" value="{{@field['value']}}">
......@@ -10,7 +10,7 @@
<include href="./base/nav/nav.htm"/>
<repeat group="{{ @siteStructure }}" key="{{ @position }}" value="{{ @section}}">
<check if="{{ @section[id] === 'footer' }}">
<check if="{{ @section['id'] === 'footer' }}">
......@@ -20,13 +20,13 @@
<section class="relative moduleSectionContainer" id="{{@section[id]}}">
<include if="{{ @isAdminPage }}" href="./base/editBtns/addSection.htm" with="reference={{@section[id]}},positionReference='before'"/>
<section class="relative moduleSectionContainer" id="{{@section['id']}}">
<include if="{{ @isAdminPage }}" href="./base/editBtns/addSection.htm" with="reference={{@section['id']}},positionReference='before'"/>
<include href="{{ './modules/' . @section['module'] . '/module.htm' }}" with="id={{@section[id]}},fields={{@section[fields]}}"/>
<include href="{{ './modules/' . @section['module'] . '/module.htm' }}" with="id={{@section['id']}},fields={{@section['fields']}}"/>
<check if="{{ @isAdminPage }}">
<include href="./base/generalModuleOptions/generalModuleOptions.htm" with="id={{@section[id]}}"/>
<include href="./base/generalModuleOptions/generalModuleOptions.htm" with="id={{@section['id']}}"/>
......@@ -51,4 +51,4 @@
<include href="./base/includes/scripts.htm"/>
<include href="./base/siteOptionsModal/mediaManagment/croppingModal.htm" />
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment