Skip to content

Commit 1f743b6

Browse files
Merge pull request #5 from nikosev/feature-minor_style_changes
Minor style changes
2 parents 372c7f9 + 05e2ae3 commit 1f743b6

File tree

10 files changed

+66
-58
lines changed

10 files changed

+66
-58
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased]
8+
<!-- markdownlint-disable line-length -->
9+
10+
## [v3.1.0](https://github.com/rciam/simplesamlphp-module-themevanilla/compare/v3.0.0...v3.1.0) - 2021-08-27
11+
12+
<!-- markdownlint-enable line-length -->
913

1014
This version is compatible with [SimpleSAMLphp v1.18](https://simplesamlphp.org/docs/1.18/simplesamlphp-changelog)
1115

templates/confirmemail.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
</div>
1616

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

templates/views.tpl.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,24 @@
99

1010
// Get request parameter and load Content
1111
if (!empty($_REQUEST['id']) && !empty($views)) {
12-
$ld_view = $views[$_REQUEST['id']];
13-
$contextOptions = array(
14-
'ssl' => array(
12+
$ldView = $views[$_REQUEST['id']];
13+
$contextOptions = [
14+
'ssl' => [
1515
'verify_peer' => false,
16-
),
17-
'http' => array(
16+
],
17+
'http' => [
1818
'timeout' => 2, // 2 Seconds
19-
),
20-
);
19+
],
20+
];
2121
$sslContext = stream_context_create($contextOptions);
22-
$loaded_content = file_get_contents($ld_view, false, $sslContext);
23-
if (!empty($loaded_content)) {
24-
$body = $loaded_content;
22+
$loadedContent = file_get_contents($ldView, false, $sslContext);
23+
if (!empty($loadedContent)) {
24+
$body = $loadedContent;
2525
}
2626
}
2727

2828
// Load Head and Dependencies
29-
$this->data['jquery'] = array('core' => true, 'ui' => true, 'css' => true);
29+
$this->data['jquery'] = ['core' => true, 'ui' => true, 'css' => true];
3030
// Load Header
3131
$this->includeAtTemplateBase('includes/header.php');
3232
// Load Body

themes/ssp/attrauthcomanage/exception.tpl.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@
99
<pre>
1010
<?php
1111
$tag = preg_replace('/attrauthcomanage:/', 'themevanilla:', $this->data['e'], 1);
12-
echo (
13-
!empty($this->getTag('{' . $tag . '}'))
14-
? $this->t('{' . $tag . '}', $this->data['parameters'])
15-
: $this->data['e']
16-
);
12+
echo !empty($this->getTag('{' . $tag . '}'))
13+
? $this->t('{' . $tag . '}', $this->data['parameters'])
14+
: $this->data['e'];
1715
?>
1816
</pre>
1917

themes/ssp/consent/consentform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ function present_attributes_ssp($t, $attributes, $nameParent)
167167
<?php
168168
if ($this->data['usestorage']) {
169169
$checked = ($this->data['checked'] ? 'checked="checked"' : '');
170-
echo '<input type="checkbox" name="saveconsent" ' . $checked .
171-
' value="1" /> ' . $this->t('{consent:consent:remember}');
170+
echo '<input type="checkbox" name="saveconsent" ' . $checked
171+
. ' value="1" /> ' . $this->t('{consent:consent:remember}');
172172
} // Embed hidden fields...
173173
?>
174174
<input type="hidden" name="StateId" value="<?= htmlspecialchars($this->data['stateId']) ?>" />

themes/ssp/default/includes/footer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@
4444
<!-- Add language bar -->
4545
<?php
4646
$includeLanguageBar = (!empty($_POST)) ? false : true;
47-
$includeLanguageBar = (isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === true)
48-
? false : true;
47+
$includeLanguageBar = (
48+
(isset($this->data['hideLanguageBar']) && $this->data['hideLanguageBar'] === true)
49+
? false
50+
: true
51+
);
4952

5053
if ($includeLanguageBar) {
5154
$this->includeAtTemplateBase('includes/language_bar.php');

themes/ssp/default/includes/header.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@
7070
<link
7171
rel="shortcut icon"
7272
type="image/x-icon"
73-
href="<?= htmlspecialchars(SimpleSAML\Module::getModuleURL('themevanilla/resources/images/favicon.ico')) ?>"
73+
href="<?= htmlspecialchars(
74+
SimpleSAML\Module::getModuleURL('themevanilla/resources/images/favicon.ico')
75+
) ?>"
7476
/>
7577

7678
<?php
@@ -91,8 +93,8 @@
9193
. 'resources/jquery-ui-1.8.js"></script>' . "\n";
9294
}
9395
if (isset($jquery['css']) && $jquery['css']) {
94-
echo '<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] .
95-
'resources/uitheme1.8/jquery-ui.css" />' . "\n";
96+
echo '<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath']
97+
. 'resources/uitheme1.8/jquery-ui.css" />' . "\n";
9698
}
9799
}
98100
}

themes/ssp/default/includes/language_bar.php

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,45 @@
22

33
// Language names dictionary
44
$langNames = [
5-
'no' => 'Bokmål', // Norwegian Bokmål
6-
'nn' => 'Nynorsk', // Norwegian Nynorsk
7-
'se' => 'Sámegiella', // Northern Sami
5+
'af' => 'Afrikaans', // Afrikaans
6+
'ar' => 'العربية', // Arabic
7+
'ca' => 'Català', // Catalan
8+
'cs' => 'Čeština', // Czech
89
'da' => 'Dansk', // Danish
9-
'en' => 'English',
1010
'de' => 'Deutsch', // German
11-
'sv' => 'Svenska', // Swedish
12-
'fi' => 'Suomeksi', // Finnish
11+
'el' => 'ελληνικά', // Greek
12+
'en' => 'English',
1313
'es' => 'Español', // Spanish
14-
'ca' => 'Català', // Catalan
14+
'et' => 'eesti keel', // Estonian
15+
'eu' => 'Euskara', // Basque
16+
'fi' => 'Suomeksi', // Finnish
1517
'fr' => 'Français', // French
18+
'he' => 'עִבְרִית', // Hebrew
19+
'hr' => 'Hrvatski', // Croatian
20+
'hu' => 'Magyar', // Hungarian
21+
'id' => 'Bahasa Indonesia', // Indonesian
1622
'it' => 'Italiano', // Italian
17-
'nl' => 'Nederlands', // Dutch
23+
'ja' => '日本語', // Japanese
1824
'lb' => 'Lëtzebuergesch', // Luxembourgish
19-
'cs' => 'Čeština', // Czech
20-
'sl' => 'Slovenščina', // Slovensk
2125
'lt' => 'Lietuvių kalba', // Lithuanian
22-
'hr' => 'Hrvatski', // Croatian
23-
'hu' => 'Magyar', // Hungarian
26+
'lv' => 'Latviešu', // Latvian
27+
'nl' => 'Nederlands', // Dutch
28+
'nn' => 'Nynorsk', // Norwegian Nynorsk
29+
'no' => 'Bokmål', // Norwegian Bokmål
2430
'pl' => 'Język polski', // Polish
2531
'pt' => 'Português', // Portuguese
2632
'pt-br' => 'Português brasileiro', // Portuguese
33+
'ro' => 'Românește', // Romanian
2734
'ru' => 'русский язык', // Russian
28-
'et' => 'eesti keel', // Estonian
35+
'se' => 'Sámegiella', // Northern Sami
36+
'sl' => 'Slovenščina', // Slovensk
37+
'sr' => 'Srpski', // Serbian
38+
'sv' => 'Svenska', // Swedish
2939
'tr' => 'Türkçe', // Turkish
30-
'el' => 'ελληνικά', // Greek
31-
'ja' => '日本語', // Japanese
40+
'xh' => 'isiXhosa', // Xhosa
3241
'zh' => '简体中文', // Chinese (simplified)
3342
'zh-tw' => '繁體中文', // Chinese (traditional)
34-
'ar' => 'العربية', // Arabic
35-
'he' => 'עִבְרִית', // Hebrew
36-
'id' => 'Bahasa Indonesia', // Indonesian
37-
'sr' => 'Srpski', // Serbian
38-
'lv' => 'Latviešu', // Latvian
39-
'ro' => 'Românește', // Romanian
40-
'eu' => 'Euskara', // Basque
41-
'af' => 'Afrikaans', // Afrikaans
4243
'zu' => 'IsiZulu', // Zulu
43-
'xh' => 'isiXhosa', // Xhosa
4444
];
4545

4646
$languages = $this->getLanguageList();
@@ -57,14 +57,15 @@
5757
} else {
5858
$textArray[] =
5959
'<li class="ssp-dropdown__two_cols--item">'
60-
. '<a href="'
61-
. htmlspecialchars(
60+
. '<a href="' . htmlspecialchars(
6261
\SimpleSAML\Utils\HTTP::addURLParameters(
6362
\SimpleSAML\Utils\HTTP::getSelfURL(),
6463
[$this->getTranslator()->getLanguage()->getLanguageParameterName() => $lang]
6564
)
66-
)
67-
. '">' . $langNames[$lang] . '</a></li>';
65+
) . '">'
66+
. $langNames[$lang]
67+
. '</a>'
68+
. '</li>';
6869
}
6970
}
7071
?>
@@ -79,8 +80,8 @@ class="ssp-btn btn ssp-btn__footer dropdown-toggle"
7980
<span class="caret"></span>
8081
</button>
8182
<ul class="dropdown-menu dropdown-menu-left ssp-dropdown__two_cols" aria-labelledby="dropdownMenu1">
82-
<?= implode(' ', $textarray) ?>
83+
<?= implode(' ', $textArray) ?>
8384
</ul>
8485
</div> <!-- dropup -->
8586
</div> <!-- col-sm-4 -->
86-
<?php endif; ?>
87+
<?php endif;

themes/ssp/discopower/disco.tpl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22

3+
use Webmozart\Assert\Assert;
4+
35
// Get Configuration and set the loader
46
$themeConfig = SimpleSAML\Configuration::getConfig('module_themevanilla.php');
57
$loader = $themeConfig->getValue('loader');
68
if (!empty($loader)) {
79
$this->includeAtTemplateBase('includes/' . $loader . '.php');
810
}
911

10-
use Webmozart\Assert\Assert;
11-
1212
$favEntry = null;
1313
foreach ($this->data['idplist'] as $tab => $sList) {
1414
if (!empty($this->data['preferredidp']) && array_key_exists($this->data['preferredidp'], $sList)) {

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
simplesamlphp-module-themevanilla
2-
version 3.0.0
2+
version 3.1.0

0 commit comments

Comments
 (0)