Skip to content

Commit dfe242d

Browse files
committed
Remove sequentially echos (part 2)
1 parent 7affeb9 commit dfe242d

4 files changed

Lines changed: 25 additions & 26 deletions

File tree

themes/ssp/authX509/X509error.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ class="float-l"
2626
<?= $this->t('{login:login_button}') ?>
2727
</a>
2828

29-
<?php
30-
31-
if (!empty($this->data['links'])) {
32-
echo '<ul class="links list-unstyled" style="margin-top: 2em">';
33-
foreach ($this->data['links'] as $l) {
34-
echo '<li><a href="' . htmlspecialchars($l['href']) . '">'
35-
. htmlspecialchars($this->t($l['text']))
36-
. '</a></li>';
37-
}
38-
echo '</ul>';
39-
}
29+
<?php if (!empty($this->data['links'])) : ?>
30+
<ul class="links list-unstyled" style="margin-top: 2em">
31+
<?php foreach ($this->data['links'] as $l) : ?>
32+
<li>
33+
<a href="<?= htmlspecialchars($l['href']) ?>">
34+
<?= htmlspecialchars($this->t($l['text'])) ?>
35+
</a>
36+
</li>
37+
<?php endforeach; ?>
38+
</ul>
39+
<?php endif;
4040

4141
$this->includeAtTemplateBase('includes/footer.php');

themes/ssp/consent/consentform.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,10 @@ class="ssp-btn ssp-btn__secondary btn ssp-btns-container--btn__right text-upperc
212212
</div> <!-- /ssp-content-group -->
213213
</div> <!-- /row -->
214214

215-
<?php
216-
if ($this->data['sppp'] !== false) {
217-
echo "<p>" . htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) . " ";
218-
echo '<a target="_blank" href="' . htmlspecialchars($this->data['sppp']) . '">' . $dstName . "</a>";
219-
echo "</p>";
220-
}
215+
<?php if ($this->data['sppp'] !== false) : ?>
216+
<p><?= htmlspecialchars($this->t('{consent:consent:consent_privacypolicy}')) ?>
217+
<a target="_blank" href="<?= htmlspecialchars($this->data['sppp']) ?>"><?= $dstName ?></a>
218+
</p>
219+
<?php endif;
221220

222221
$this->includeAtTemplateBase('includes/footer.php');

themes/ssp/consent/logout_completed.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
$this->data['header'] = $this->t('{logout:title}');
44
$this->data['jquery'] = ['core' => true];
55
$this->includeAtTemplateBase('includes/header.php');
6+
?>
67

7-
echo '<h2>' . $this->data['header'] . '</h2>';
8-
echo '<p>' . $this->t('{logout:logged_out_text}') . '</p>';
8+
<h2><?= $this->data['header'] ?></h2>
9+
<p><?= $this->t('{logout:logged_out_text}') ?></p>
910

11+
<?php
1012
$this->includeAtTemplateBase('includes/footer.php');

themes/ssp/default/includes/header.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,11 @@
141141
<body<?= $onLoad ?>>
142142

143143
<div class="header">
144-
<?php
145-
if (!empty($ribbonText)) {
146-
echo '<div class="corner-ribbon red">';
147-
echo $ribbonText;
148-
echo '</div>';
149-
}
150-
?>
144+
<?php if (!empty($ribbonText)) : ?>
145+
<div class="corner-ribbon red">
146+
<?= $ribbonText ?>
147+
</div>
148+
<?php endif; ?>
151149
<div class="text-center ssp-logo">
152150
<a
153151
<?=

0 commit comments

Comments
 (0)