Skip to content

Commit a32ad58

Browse files
committed
Remove sequentially echos
1 parent 7e5a9de commit a32ad58

4 files changed

Lines changed: 100 additions & 88 deletions

File tree

themes/ssp/core/no_cookie.tpl.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99

1010
$this->data['header'] = $header;
1111
$this->includeAtTemplateBase('includes/header.php');
12+
?>
1213

13-
echo ('<h2>' . $header . '</h2>');
14-
echo ('<p>' . $description . '</p>');
14+
<h2><?= $header ?></h2>
15+
<p><?= $description ?></p>
1516

16-
if ($retryURL !== null) {
17-
echo ('<ul class="list-unstyled">');
18-
echo ('<li><a href="' . htmlspecialchars($retryURL) . '" id="retry">' . $retry . '</a></li>');
19-
echo ('</ul>');
20-
}
17+
<?php if ($retryURL !== null) : ?>
18+
<ul class="list-unstyled">
19+
<li><a href="<?= htmlspecialchars($retryURL) ?>" id="retry"><?= $retry ?></a></li>
20+
</ul>
21+
<?php endif;
2122

2223
$this->includeAtTemplateBase('includes/footer.php');
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
<?php
1+
<p><?= $this->t('{core:no_metadata:config_problem}') ?></p>
22

3-
echo ('<p>' . $this->t('{core:no_metadata:config_problem}') . '</p>');
4-
5-
echo ('<ul class="list-unstyled">');
6-
echo ('<li>' . $this->t('{core:no_metadata:suggestion_user_link}') . '</li>');
7-
echo ('<li>' . $this->t('{core:no_metadata:suggestion_developer}') . '</li>');
8-
echo ('</ul>');
3+
<ul class="list-unstyled">
4+
<li><?= $this->t('{core:no_metadata:suggestion_user_link}') ?></li>
5+
<li><?= $this->t('{core:no_metadata:suggestion_developer}') ?></li>
6+
</ul>

themes/ssp/core/no_state.tpl.php

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
1-
<?php
1+
<h2><?= $this->t('{core:no_state:suggestions}') ?></h2>
2+
<ul class="list-nstyled">
3+
<li><?= $this->t('{core:no_state:suggestion_badlink}') ?></li>
4+
<li><?= $this->t('{core:no_state:suggestion_goback}') ?></li>
5+
<li><?= $this->t('{core:no_state:suggestion_closebrowser}') ?></li>
6+
</ul>
27

3-
echo ('<h2>' . $this->t('{core:no_state:suggestions}') . '</h2>');
4-
echo ('<ul class="list-unstyled">');
5-
echo ('<li>' . $this->t('{core:no_state:suggestion_badlink}') . '</li>');
6-
echo ('<li>' . $this->t('{core:no_state:suggestion_goback}') . '</li>');
7-
echo ('<li>' . $this->t('{core:no_state:suggestion_closebrowser}') . '</li>');
8-
echo ('</ul>');
9-
10-
echo ('<h3>' . $this->t('{core:no_state:causes}') . '</h3>');
11-
echo ('<ul class="list-unstyled">');
12-
echo ('<li>' . $this->t('{core:no_state:cause_badlink}') . '</li>');
13-
echo ('<li>' . $this->t('{core:no_state:cause_backforward}') . '</li>');
14-
echo ('<li>' . $this->t('{core:no_state:cause_openbrowser}') . '</li>');
15-
echo ('<li>' . $this->t('{core:no_state:cause_nocookie}') . '</li>');
16-
echo ('</ul>');
8+
<h3><?= $this->t('{core:no_state:causes}') ?></h3>
9+
<ul class="list-nstyled">
10+
<li><?= $this->t('{core:no_state:cause_badlink}') ?></li>
11+
<li><?= $this->t('{core:no_state:cause_backforward}') ?></li>
12+
<li><?= $this->t('{core:no_state:cause_openbrowser}') ?></li>
13+
<li><?= $this->t('{core:no_state:cause_nocookie}') ?></li>
14+
</ul>

themes/ssp/discopower/disco.tpl.php

Lines changed: 74 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -132,67 +132,82 @@ function getTranslatedName($t, $metadata)
132132
return $metadata['entityid'];
133133
}
134134

135-
if (!empty($favEntry)) {
136-
echo ('
135+
if (!empty($favEntry)) : ?>
137136
<div class="modal fade" id="favourite-modal" tabindex="-1" role="dialog">
138-
<div class="modal-dialog">
139-
<div class="modal-content">
140-
<div class="modal-header">
141-
<button type="button" class="js-close-custom close"><span aria-hidden="true">&times;</span></button>
142-
<h2 class="modal-title">'
143-
. (
144-
strpos($this->t('{themevanilla:discopower:favourite_dialog_title}'), 'not translated') === false
145-
? $this->t('{themevanilla:discopower:favourite_dialog_title}')
146-
: ''
147-
)
148-
. '</h2>
149-
</div>
150-
<div class="modal-body ssp-modal-body">
151-
<div class="row text-center">
152-
<form
153-
id="idpselectform" method="get" action="' . $this->data['urlpattern'] . '"
154-
class="ssp-form-favourite"
155-
>
156-
<input type="hidden" name="entityID" value="' . htmlspecialchars($this->data['entityID']) . '" />
157-
<input type="hidden" name="return" value="' . htmlspecialchars($this->data['return']) . '" />
158-
<input
159-
type="hidden" name="returnIDParam"
160-
value="' . htmlspecialchars($this->data['returnIDParam']) . '"
161-
/>
162-
<input type="hidden" name="idpentityid" value="' . htmlspecialchars($favEntry['entityid']) . '" />
163-
<input
164-
type="submit" name="formsubmit" id="favouritesubmit"
165-
class="ssp-btn ssp-btn__action text-uppercase"
166-
value="'
167-
. $this->t('{themevanilla:discopower:login_with}') . ' '
168-
. htmlspecialchars(getTranslatedName($this, $favEntry)) . '"
169-
/>
170-
</form>
171-
</div>
172-
<div class="row text-center ssp-modal-or">'
173-
. (
174-
strpos($this->t('{themevanilla:discopower:or}'), 'not translated') === false
175-
? $this->t('{themevanilla:discopower:or}')
176-
: ''
177-
)
178-
. '
179-
</div>
180-
<div class="row text-center">
181-
<button class="ssp-btn text-uppercase ssp-btn ssp-btn__secondary js-close-custom">'
182-
. (strpos(
183-
$this->t('{themevanilla:discopower:favourite_dialog_button_close}'),
184-
'not translated'
185-
) === false
186-
? $this->t('{themevanilla:discopower:favourite_dialog_button_close}')
187-
: '') .
188-
'</button>
189-
</div>
190-
</div> <!-- /modal-body -->
191-
</div> <!-- /modal-content -->
192-
</div> <!-- /modal-dialog -->
137+
<div class="modal-dialog">
138+
<div class="modal-content">
139+
<div class="modal-header">
140+
<button type="button" class="js-close-custom close"><span aria-hidden="true">&times;</span></button>
141+
<h2 class="modal-title">
142+
<?=
143+
strpos($this->t('{themevanilla:discopower:favourite_dialog_title}'), 'not translated') === false
144+
? $this->t('{themevanilla:discopower:favourite_dialog_title}')
145+
: ''
146+
?>
147+
</h2>
148+
</div>
149+
<div class="modal-body ssp-modal-body">
150+
<div class="row text-center">
151+
<form
152+
id="idpselectform"
153+
method="get"
154+
action="<?= $this->data['urlpattern'] ?>"
155+
class="ssp-form-favourite"
156+
>
157+
<input
158+
type="hidden"
159+
name="entityID"
160+
value="<?= htmlspecialchars($this->data['entityID']) ?>"
161+
/>
162+
<input
163+
type="hidden"
164+
name="return"
165+
value="<?= htmlspecialchars($this->data['return']) ?>"
166+
/>
167+
<input
168+
type="hidden"
169+
name="returnIDParam"
170+
value="<?= htmlspecialchars($this->data['returnIDParam']) ?>"
171+
/>
172+
<input
173+
type="hidden"
174+
name="idpentityid"
175+
value="<?= htmlspecialchars($favEntry['entityid']) ?>"
176+
/>
177+
<input
178+
type="submit"
179+
name="formsubmit"
180+
id="favouritesubmit"
181+
class="ssp-btn ssp-btn__action text-uppercase"
182+
value="<?= $this->t('{themevanilla:discopower:login_with}') . ' '
183+
. htmlspecialchars(getTranslatedName($this, $favEntry)) ?>"
184+
/>
185+
</form>
186+
</div>
187+
<div class="row text-center ssp-modal-or">
188+
<?=
189+
strpos($this->t('{themevanilla:discopower:or}'), 'not translated') === false
190+
? $this->t('{themevanilla:discopower:or}')
191+
: ''
192+
?>
193+
</div>
194+
<div class="row text-center">
195+
<button class="ssp-btn text-uppercase ssp-btn ssp-btn__secondary js-close-custom">
196+
<?=
197+
strpos(
198+
$this->t('{themevanilla:discopower:favourite_dialog_button_close}'),
199+
'not translated'
200+
) === false
201+
? $this->t('{themevanilla:discopower:favourite_dialog_button_close}')
202+
: ''
203+
?>
204+
</button>
205+
</div>
206+
</div> <!-- /modal-body -->
207+
</div> <!-- /modal-content -->
208+
</div> <!-- /modal-dialog -->
193209
</div> <!-- /modal -->
194-
');
195-
}
210+
<?php endif;
196211

197212
$idpsInSearchableListIndex;
198213
$idpsWithLogosIndex;

0 commit comments

Comments
 (0)