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 @@ ...@@ -13,22 +13,22 @@
<true> <true>
</true> </true>
<false> <false>
<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"> <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" <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> </div>
<div class="row parent-hover relative white hoverBorderInBox chooseModuleBtn light-shadow " style="break-inside: avoid-column !important; <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 "> <div class="row no-margin frama-purple-text ">
<h5 class="center-align no-margin" style="padding: 5px 0 10px 0"> <h5 class="center-align no-margin" style="padding: 5px 0 10px 0">
{{@module[title]}}</h5> {{@module['title']}}</h5>
</div> </div>
<div class="row no-margin no-padding "> <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">
</div> </div>
<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> <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>
</div> </div>
...@@ -42,4 +42,4 @@ ...@@ -42,4 +42,4 @@
</div> </div>
</div> </div>
<include href="./base/editBtns/addSectionForm.htm"/> <include href="./base/editBtns/addSectionForm.htm"/>
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<script> <script>
SiteOptions = {{@siteOptionsJson |raw}}; SiteOptions = {{@siteOptionsJson |raw}};
CSRFToken= '{{@SESSION[CSRFToken]}}' CSRFToken= '{{@SESSION['CSRFToken']}}'
isAdminPage ="{{@isAdminPage}}" isAdminPage ="{{@isAdminPage}}"
scrollFireOptions = [] scrollFireOptions = []
</script> </script>
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<repeat group="{{ @siteStructure }}" value="{{ @section }}"> <repeat group="{{ @siteStructure }}" value="{{ @section }}">
<check if="{{ @section['inMenuAs'] }}"> <check if="{{ @section['inMenuAs'] }}">
<li class="relative "> <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 }}"> <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" <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> 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 @@ ...@@ -54,7 +54,7 @@
<repeat group="{{ @siteStructure }}" value="{{ @section }}"> <repeat group="{{ @siteStructure }}" value="{{ @section }}">
<check if="{{ @section['inMenuAs'] }}"> <check if="{{ @section['inMenuAs'] }}">
<li class="relative " style="margin-top: -10px"> <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>
</li> </li>
</check> </check>
</repeat> </repeat>
...@@ -65,4 +65,4 @@ ...@@ -65,4 +65,4 @@
</div> </div>
</nav> </nav>
\ No newline at end of file
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<input type="text" class="displaynone" name="CSRFToken" value="{{@CSRFToken}}"> <input type="text" class="displaynone" name="CSRFToken" value="{{@CSRFToken}}">
<input type="text" name ="hash" class="displaynone"> <input type="text" name ="hash" class="displaynone">
<repeat group="{{ @siteStructure }}" value="{{ @section }}"> <repeat group="{{ @siteStructure }}" value="{{ @section }}">
<repeat group="{{ @section[fields] }}" key=" {{@fieldName}}" value="{{ @field }}"> <repeat group="{{ @section['fields'] }}" key=" {{@fieldName}}" value="{{ @field }}">
<input name="{{'uglyForm-'.@section[id] . '-' .@fieldName}}" type="{{@field[type]}}" value="{{@field[value]}}"> <input name="{{'uglyForm-'.@section['id'] . '-' .@fieldName}}" type="{{@field['type']}}" value="{{@field['value']}}">
</repeat> </repeat>
</repeat> </repeat>
</form> </form>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<include href="./base/nav/nav.htm"/> <include href="./base/nav/nav.htm"/>
<repeat group="{{ @siteStructure }}" key="{{ @position }}" value="{{ @section}}"> <repeat group="{{ @siteStructure }}" key="{{ @position }}" value="{{ @section}}">
<check if="{{ @section[id] === 'footer' }}"> <check if="{{ @section['id'] === 'footer' }}">
<true> <true>
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
</true> </true>
<false> <false>
<section class="relative moduleSectionContainer" id="{{@section[id]}}"> <section class="relative moduleSectionContainer" id="{{@section['id']}}">
<include if="{{ @isAdminPage }}" href="./base/editBtns/addSection.htm" with="reference={{@section[id]}},positionReference='before'"/> <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 }}"> <check if="{{ @isAdminPage }}">
<include href="./base/generalModuleOptions/generalModuleOptions.htm" with="id={{@section[id]}}"/> <include href="./base/generalModuleOptions/generalModuleOptions.htm" with="id={{@section['id']}}"/>
</check> </check>
...@@ -51,4 +51,4 @@ ...@@ -51,4 +51,4 @@
<include href="./base/includes/scripts.htm"/> <include href="./base/includes/scripts.htm"/>
<include href="./base/siteOptionsModal/mediaManagment/croppingModal.htm" /> <include href="./base/siteOptionsModal/mediaManagment/croppingModal.htm" />
</body> </body>
</html> </html>
\ 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