Merge pull request #8767 from MrPetovan/bug/8746-smarty-vars-leak
Clear all previous template variables before replacing Macros
This commit is contained in:
commit
e3f8a653a1
3 changed files with 38 additions and 35 deletions
|
@ -83,6 +83,8 @@ final class FriendicaSmartyEngine extends TemplateEngine
|
||||||
Hook::callAll('template_vars', $arr);
|
Hook::callAll('template_vars', $arr);
|
||||||
$vars = $arr['vars'];
|
$vars = $arr['vars'];
|
||||||
|
|
||||||
|
$this->smarty->clearAllAssign();
|
||||||
|
|
||||||
foreach ($vars as $key => $value) {
|
foreach ($vars as $key => $value) {
|
||||||
if ($key[0] === '$') {
|
if ($key[0] === '$') {
|
||||||
$key = substr($key, 1);
|
$key = substr($key, 1);
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead'] ?>
|
<?php if(!empty($page['htmlhead'])) echo $page['htmlhead'] ?>
|
||||||
</head>
|
</head>
|
||||||
<body class="minimal">
|
<body class="minimal">
|
||||||
<section><?php if(!empty($page['content'])) echo $page['content']; ?>
|
<section>
|
||||||
|
<div class="generic-page-wrapper">
|
||||||
|
<?php if(!empty($page['content'])) echo $page['content']; ?>
|
||||||
|
</div>
|
||||||
<div id="page-footer"></div>
|
<div id="page-footer"></div>
|
||||||
</section>
|
</section>
|
||||||
<!-- Modal -->
|
<!-- Modal -->
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
<div class="generic-page-wrapper">
|
|
||||||
<h1>{{$header}}</h1>
|
<h1>{{$header}}</h1>
|
||||||
|
|
||||||
{{if !$myaddr}}
|
{{if !$myaddr}}
|
||||||
|
@ -42,4 +41,3 @@
|
||||||
<input class="btn btn-default" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel}}">
|
<input class="btn btn-default" type="submit" name="cancel" id="dfrn-request-cancel-button" value="{{$cancel}}">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
|
||||||
|
|
Loading…
Reference in a new issue