@@ -89,12 +89,12 @@ |
||
89 | 89 | $this->templates[WELCOME_ABOARD_TERMS] = ""; |
90 | 90 | foreach ([ |
91 | 91 | "eduroam" => [ |
92 | - "TOU" => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions", |
|
93 | - "PRIV" => "https://www.eduroam.org/privacy/", |
|
92 | + "TOU" => "https://wiki.geant.org/display/H2eduroam/Terms+and+Conditions", |
|
93 | + "PRIV" => "https://www.eduroam.org/privacy/", |
|
94 | 94 | ], |
95 | 95 | "OpenRoaming" => [ |
96 | - "TOU" => "https://wballiance.com/openroaming/toc-2020/", |
|
97 | - "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/", |
|
96 | + "TOU" => "https://wballiance.com/openroaming/toc-2020/", |
|
97 | + "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/", |
|
98 | 98 | ] |
99 | 99 | ] as $consortium => $terms) { |
100 | 100 | $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU'], $terms['PRIV']); |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | const DOWNLOAD_REDIRECT_CONTINUE = 1054; |
51 | 51 | const SB_GO_AWAY = 1060; |
52 | 52 | const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061; |
53 | -const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062; |
|
53 | +const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062; |
|
54 | 54 | |
55 | 55 | |
56 | 56 | /** |
@@ -97,14 +97,14 @@ discard block |
||
97 | 97 | "PRIV" => "https://wballiance.com/openroaming/privacy-policy-2020/", |
98 | 98 | ] |
99 | 99 | ] as $consortium => $terms) { |
100 | - $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>" . _("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.") . "</p>", $consortium, $terms['TOU'], $terms['PRIV']); |
|
100 | + $this->templates[WELCOME_ABOARD_TERMS] .= sprintf("<p>"._("When connecting to %s hotspots, the following <a href='%s'>Terms and Conditions</a> and <a href='%s'>Privacy Notice</a> apply.")."</p>", $consortium, $terms['TOU'], $terms['PRIV']); |
|
101 | 101 | } |
102 | 102 | // this would actually be a checkbox which grays out the actual download button until ACKed |
103 | 103 | $this->templates[WELCOME_ABOARD_TERMS] .= "<p>"._("I agree to be bound by these Terms and Conditions.")."</p>"; |
104 | 104 | $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads"); |
105 | 105 | $this->templates[EDUROAM_WELCOME_ADVERTISING] = sprintf(_("we would like to warmly welcome you among the several million users of %s! From now on, you will be able to use internet access resources on thousands of universities, research centres and other places all over the globe. All of this completely free of charge!"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
106 | 106 | $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']); |
107 | - $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
107 | + $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
|
108 | 108 | $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
109 | 109 | $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation"); |
110 | 110 | $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']); |
@@ -118,13 +118,13 @@ discard block |
||
118 | 118 | ], |
119 | 119 | |
120 | 120 | /** |
121 | - * Configuration for GeoIP2 |
|
122 | - * Beware, the legacy version does not really work with IPv6 addresses |
|
123 | - * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
124 | - * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
125 | - * geoip2-path-to-db: points to the GeoIP2 city database |
|
126 | - * @var array |
|
127 | - */ |
|
121 | + * Configuration for GeoIP2 |
|
122 | + * Beware, the legacy version does not really work with IPv6 addresses |
|
123 | + * version: set to 2 if you wish to use GeoIP2, to 1 for the legacy version or set to 0 to turn off geolocation service |
|
124 | + * geoip2-path-to-autoloader: points to the GeoIP2 autoloader |
|
125 | + * geoip2-path-to-db: points to the GeoIP2 city database |
|
126 | + * @var array |
|
127 | + */ |
|
128 | 128 | |
129 | 129 | 'GEOIP' => [ |
130 | 130 | 'version' => 0, |
@@ -152,7 +152,6 @@ discard block |
||
152 | 152 | * mails, just configure the signing cert with these parameters. All must |
153 | 153 | * be non-NULL for signing to happen. If you don't need a keypass, make |
154 | 154 | * it an empty string instead. |
155 | - |
|
156 | 155 | * @var array |
157 | 156 | */ |
158 | 157 | 'MAILSETTINGS' => [ // we always use Submission |
@@ -172,26 +171,26 @@ discard block |
||
172 | 171 | * @var array |
173 | 172 | */ |
174 | 173 | 'LANGUAGES' => [ |
175 | - 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE], |
|
176 | - 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
177 | - 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE], |
|
178 | - 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
179 | - 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
180 | - 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
181 | - 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
182 | - 'et' => ['display' => 'Eesti', 'locale' => 'et_EE.utf8', 'latin_based' => TRUE], |
|
183 | - 'fr' => ['display' => 'Français', 'locale' => 'fr_FR.utf8', 'latin_based' => TRUE], |
|
184 | - 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
185 | - 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
186 | - 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
187 | - 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
188 | - 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
189 | - 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
190 | - 'ro' => ['display' => 'Română', 'locale' => 'ro_RO.utf8', 'latin_based' => TRUE], |
|
191 | - 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
192 | - 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
193 | - 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
194 | - 'tr' => ['display' => 'Türkçe', 'locale' => 'tr_TR.utf8', 'latin_based' => TRUE], |
|
174 | + 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE], |
|
175 | + 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
176 | + 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE], |
|
177 | + 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
178 | + 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
179 | + 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
180 | + 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
181 | + 'et' => ['display' => 'Eesti', 'locale' => 'et_EE.utf8', 'latin_based' => TRUE], |
|
182 | + 'fr' => ['display' => 'Français', 'locale' => 'fr_FR.utf8', 'latin_based' => TRUE], |
|
183 | + 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
184 | + 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
185 | + 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
186 | + 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
187 | + 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
188 | + 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
189 | + 'ro' => ['display' => 'Română', 'locale' => 'ro_RO.utf8', 'latin_based' => TRUE], |
|
190 | + 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
191 | + 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
192 | + 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
193 | + 'tr' => ['display' => 'Türkçe', 'locale' => 'tr_TR.utf8', 'latin_based' => TRUE], |
|
195 | 194 | |
196 | 195 | |
197 | 196 | |
@@ -277,7 +276,7 @@ discard block |
||
277 | 276 | 'user' => 'customerservice', |
278 | 277 | 'pass' => '2lame4u', |
279 | 278 | 'readonly' => TRUE, ], |
280 | - 'enforce-external-sync' => TRUE, |
|
279 | + 'enforce-external-sync' => TRUE, |
|
281 | 280 | ], |
282 | 281 | |
283 | 282 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | |
156 | 156 | * @var array |
157 | 157 | */ |
158 | - 'MAILSETTINGS' => [ // we always use Submission |
|
158 | + 'MAILSETTINGS' => [// we always use Submission |
|
159 | 159 | 'host' => 'submission.capable.mta', |
160 | 160 | 'user'=> 'mailuser', |
161 | 161 | 'pass' => 'mailpass', |
@@ -172,26 +172,26 @@ discard block |
||
172 | 172 | * @var array |
173 | 173 | */ |
174 | 174 | 'LANGUAGES' => [ |
175 | - 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE], |
|
176 | - 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
177 | - 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE], |
|
178 | - 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
179 | - 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
180 | - 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
181 | - 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
182 | - 'et' => ['display' => 'Eesti', 'locale' => 'et_EE.utf8', 'latin_based' => TRUE], |
|
183 | - 'fr' => ['display' => 'Français', 'locale' => 'fr_FR.utf8', 'latin_based' => TRUE], |
|
184 | - 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
185 | - 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
186 | - 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
187 | - 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
188 | - 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
189 | - 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
190 | - 'ro' => ['display' => 'Română', 'locale' => 'ro_RO.utf8', 'latin_based' => TRUE], |
|
191 | - 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
192 | - 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
193 | - 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
194 | - 'tr' => ['display' => 'Türkçe', 'locale' => 'tr_TR.utf8', 'latin_based' => TRUE], |
|
175 | + 'bg' => ['display' => 'Български', 'locale' => 'bg_BG.utf8', 'latin_based' => FALSE], |
|
176 | + 'ca' => ['display' => 'Català', 'locale' => 'ca_ES.utf8', 'latin_based' => TRUE], |
|
177 | + 'cs' => ['display' => 'Čeština', 'locale' => 'cs_CZ.utf8', 'latin_based' => TRUE], |
|
178 | + 'de' => ['display' => 'Deutsch', 'locale' => 'de_DE.utf8', 'latin_based' => TRUE], |
|
179 | + 'el' => ['display' => 'Ελληνικά', 'locale' => 'el_GR.utf8', 'latin_based' => FALSE], |
|
180 | + 'en' => ['display' => 'English(GB)', 'locale' => 'en_GB.utf8', 'latin_based' => TRUE], |
|
181 | + 'es' => ['display' => 'Español', 'locale' => 'es_ES.utf8', 'latin_based' => TRUE], |
|
182 | + 'et' => ['display' => 'Eesti', 'locale' => 'et_EE.utf8', 'latin_based' => TRUE], |
|
183 | + 'fr' => ['display' => 'Français', 'locale' => 'fr_FR.utf8', 'latin_based' => TRUE], |
|
184 | + 'hr' => ['display' => 'Hrvatski', 'locale' => 'hr_HR.utf8', 'latin_based' => TRUE], |
|
185 | + 'hu' => ['display' => 'Magyar', 'locale' => 'hu_HU.utf8', 'latin_based' => TRUE], |
|
186 | + 'it' => ['display' => 'Italiano', 'locale' => 'it_IT.utf8', 'latin_based' => TRUE], |
|
187 | + 'nb' => ['display' => 'Norsk', 'locale' => 'nb_NO.utf8', 'latin_based' => TRUE], |
|
188 | + 'pl' => ['display' => 'Polski', 'locale' => 'pl_PL.utf8', 'latin_based' => TRUE], |
|
189 | + 'pt' => ['display' => 'Português', 'locale' => 'pt_PT.utf8', 'latin_based' => TRUE], |
|
190 | + 'ro' => ['display' => 'Română', 'locale' => 'ro_RO.utf8', 'latin_based' => TRUE], |
|
191 | + 'sl' => ['display' => 'Slovenščina', 'locale' => 'sl_SI.utf8', 'latin_based' => TRUE], |
|
192 | + 'sr' => ['display' => 'Srpski', 'locale' => 'sr_RS@latin', 'latin_based' => TRUE], |
|
193 | + 'fi' => ['display' => 'Suomi', 'locale' => 'fi_FI.utf8', 'latin_based' => TRUE], |
|
194 | + 'tr' => ['display' => 'Türkçe', 'locale' => 'tr_TR.utf8', 'latin_based' => TRUE], |
|
195 | 195 | |
196 | 196 | |
197 | 197 |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | $location = $this->Gui->skinObject->findResourceUrl("IMAGES", "consortium_logo.png"); |
50 | 50 | if ($location !== FALSE) { |
51 | 51 | $retval .= "<div id='cat_logo'> |
52 | - <a href='" . CONFIG_CONFASSISTANT['CONSORTIUM']['homepage'] . "'><img id='logo_img' src='$location' alt='Consortium Logo'/></a> |
|
52 | + <a href='" . CONFIG_CONFASSISTANT['CONSORTIUM']['homepage']."'><img id='logo_img' src='$location' alt='Consortium Logo'/></a> |
|
53 | 53 | <span>Configuration Assistant Tool</span> |
54 | 54 | </div>"; |
55 | 55 | } |
56 | - $retval .= "<div id='motd'>" . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ') . "</div>"; |
|
56 | + $retval .= "<div id='motd'>".(isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ')."</div>"; |
|
57 | 57 | $loc2 = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/menu.png"); |
58 | 58 | if ($loc2 !== FALSE) { |
59 | 59 | $retval .= "<img id='hamburger' src='$loc2' alt='Menu'/>"; |
@@ -71,13 +71,13 @@ discard block |
||
71 | 71 | public function divUserWelcome() { |
72 | 72 | $retval = " |
73 | 73 | <div id='user_welcome'> <!-- this information is shown just before the download --> |
74 | - <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING] . "</strong> |
|
74 | + <strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PAGEHEADING]."</strong> |
|
75 | 75 | <p> |
76 | 76 | <span id='download_info'> |
77 | 77 | <!-- the empty href is dynamically exchanged with the actual path by jQuery at runtime --> |
78 | - " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD] . " |
|
78 | + " . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_DOWNLOAD]." |
|
79 | 79 | </span> |
80 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING] . " |
|
80 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_HEADING]." |
|
81 | 81 | <br/> |
82 | 82 | <br/>"; |
83 | 83 | switch (CONFIG_CONFASSISTANT['CONSORTIUM']['name']) { |
@@ -87,12 +87,12 @@ discard block |
||
87 | 87 | } |
88 | 88 | $retval .= " |
89 | 89 | </p> |
90 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE] . " |
|
91 | - <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS] . " |
|
92 | - <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "") . " |
|
90 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]." |
|
91 | + <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]." |
|
92 | + <p>" . (false ? $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_TERMS] : "")." |
|
93 | 93 | </p> |
94 | 94 | <p> |
95 | - <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a> |
|
95 | + <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a> |
|
96 | 96 | </p> |
97 | 97 | </div> <!-- id='user_welcomer_page' --> |
98 | 98 | "; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public function divSilverbullet() { |
103 | 103 | $retval = " |
104 | 104 | <div id='silverbullet'>" |
105 | - . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] . |
|
105 | + . $this->Gui->textTemplates->templates[user\SB_GO_AWAY]. |
|
106 | 106 | "</div> |
107 | 107 | "; |
108 | 108 | return $retval; |
@@ -115,10 +115,10 @@ discard block |
||
115 | 115 | } |
116 | 116 | return " |
117 | 117 | <div id='welcome_top1'> |
118 | - " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . " |
|
118 | + " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]." |
|
119 | 119 | </div> |
120 | 120 | <div id='top_invite'> |
121 | - " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . " |
|
121 | + " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval." |
|
122 | 122 | </div>"; |
123 | 123 | } |
124 | 124 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | $retval = " |
127 | 127 | <div id='roller'> |
128 | 128 | <div id='slides'> |
129 | - <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span> |
|
129 | + <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span> |
|
130 | 130 | <span id='line2'></span> |
131 | 131 | <span id='line3'></span> |
132 | 132 | <span id='line4'>"; |
@@ -178,9 +178,9 @@ discard block |
||
178 | 178 | public function divProfiles() { |
179 | 179 | return " |
180 | 180 | <div id='profiles'> <!-- this is the profile selection filled during run time --> |
181 | - <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . " |
|
181 | + <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]." |
|
182 | 182 | </div>" . |
183 | - "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" . |
|
183 | + "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>". |
|
184 | 184 | "</div>"; |
185 | 185 | } |
186 | 186 | |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | public function divInstitution($selectButton = TRUE) { |
195 | 195 | $retval = "<div id='institution_name'> |
196 | 196 | <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" . |
197 | - ($selectButton ? "<a id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") . |
|
197 | + ($selectButton ? "<a id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : ""). |
|
198 | 198 | "</div>"; |
199 | 199 | $retval .= $this->emptyImage('idp_logo', 'IdP Logo'); |
200 | 200 | return $retval; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | public function divOtherinstallers() { |
209 | 209 | $retval = " |
210 | 210 | <div class='sub_h'> |
211 | - <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . " |
|
211 | + <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]." |
|
212 | 212 | <table id='device_list' style='padding:0px;'>"; |
213 | 213 | |
214 | 214 | foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) { |
@@ -216,18 +216,18 @@ discard block |
||
216 | 216 | $deviceIndex = 0; |
217 | 217 | |
218 | 218 | $imgTag = ""; |
219 | - $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png"); |
|
219 | + $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png"); |
|
220 | 220 | if ($imgLocation !== FALSE) { |
221 | - $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">'; |
|
221 | + $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">'; |
|
222 | 222 | } |
223 | - $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>'; |
|
223 | + $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>'; |
|
224 | 224 | foreach ($deviceGroup as $d => $D) { |
225 | 225 | if ($deviceIndex) { |
226 | 226 | $retval .= '<tr>'; |
227 | 227 | } |
228 | - $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>" |
|
229 | - . "<div class='device_info' id='info_" . $d . "'></div></td>" |
|
230 | - . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n"; |
|
228 | + $retval .= "<td><button id='".$d."'>".$D['display']."</button>" |
|
229 | + . "<div class='device_info' id='info_".$d."'></div></td>" |
|
230 | + . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n"; |
|
231 | 231 | $deviceIndex++; |
232 | 232 | } |
233 | 233 | $retval .= "</tbody>"; |
@@ -241,15 +241,15 @@ discard block |
||
241 | 241 | } |
242 | 242 | |
243 | 243 | public function divGuessOs($operatingSystem) { |
244 | - $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png"); |
|
244 | + $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png"); |
|
245 | 245 | $vendorstyle = ""; |
246 | 246 | if ($vendorlogo !== FALSE) { |
247 | - $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'"; |
|
247 | + $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'"; |
|
248 | 248 | } |
249 | 249 | $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png"); |
250 | 250 | $deleteImg = ""; |
251 | 251 | if ($deleteIcon !== FALSE) { |
252 | - $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >"; |
|
252 | + $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >"; |
|
253 | 253 | } |
254 | 254 | return " |
255 | 255 | <div class='sub_h' id='guess_os'> |
@@ -257,23 +257,23 @@ discard block |
||
257 | 257 | <table id='browser'> |
258 | 258 | <tr> |
259 | 259 | <td> |
260 | - <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'> |
|
260 | + <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'> |
|
261 | 261 | $deleteImg |
262 | - <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . " |
|
262 | + <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]." |
|
263 | 263 | </div> |
264 | 264 | <div class='download_button_text'>" . |
265 | - $operatingSystem['display'] . " |
|
265 | + $operatingSystem['display']." |
|
266 | 266 | </div> |
267 | 267 | </button> |
268 | - <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div> |
|
268 | + <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div> |
|
269 | 269 | </td> |
270 | 270 | <td style='vertical-align:top'> |
271 | - <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button> |
|
271 | + <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button> |
|
272 | 272 | </td> |
273 | 273 | </tr> |
274 | 274 | </table> <!-- id='browser' --> |
275 | 275 | <div class='sub_h'> |
276 | - <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a> |
|
276 | + <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a> |
|
277 | 277 | </div> |
278 | 278 | </div> <!-- id='guess_os' -->"; |
279 | 279 | } |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | </td>"; |
290 | 290 | |
291 | 291 | if (!empty(CONFIG['APPEARANCE']['privacy_notice_url'])) { |
292 | - $retval .= "<td><a href='" . CONFIG['APPEARANCE']['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</a></td>"; |
|
292 | + $retval .= "<td><a href='".CONFIG['APPEARANCE']['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</a></td>"; |
|
293 | 293 | } |
294 | 294 | $retval .= "<td>"; |
295 | 295 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | |
22 | 22 | namespace core; |
23 | 23 | |
24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
25 | 25 | |
26 | 26 | $instMgmt = new \core\UserManagement(); |
27 | 27 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> |
52 | 52 | <tr> |
53 | 53 | <td> |
54 | -<?php echo "" . _("Unique Identifier") ?> |
|
54 | +<?php echo ""._("Unique Identifier") ?> |
|
55 | 55 | </td> |
56 | 56 | <td> |
57 | 57 | </td> |
@@ -64,14 +64,14 @@ discard block |
||
64 | 64 | <div> |
65 | 65 | <?php |
66 | 66 | if (CONFIG['DB']['USER']['readonly'] === FALSE) { |
67 | - echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; |
|
67 | + echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | if ($user->isFederationAdmin()) { |
71 | - echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; |
|
71 | + echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; |
|
72 | 72 | } |
73 | 73 | if ($user->isSuperadmin()) { |
74 | - echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; |
|
74 | + echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; |
|
75 | 75 | } |
76 | 76 | ?> |
77 | 77 | </div> |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { |
84 | 84 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual |
85 | 85 | } |
86 | - $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>"; |
|
86 | + $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>"; |
|
87 | 87 | } else { |
88 | 88 | $helptext = ""; |
89 | 89 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // we need to run the Federation constructor |
93 | 93 | $cat = new \core\CAT; |
94 | 94 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) |
95 | - echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst) . "</h2>"; |
|
95 | + echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst)."</h2>"; |
|
96 | 96 | $instlist = []; |
97 | 97 | $my_idps = []; |
98 | 98 | $myFeds = []; |
@@ -114,10 +114,10 @@ discard block |
||
114 | 114 | $country[$key] = $row['country']; |
115 | 115 | $name[$key] = $row['name']; |
116 | 116 | } |
117 | - echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureInst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; |
|
117 | + echo "<tr><th>".sprintf(_("%s Name"), $uiElements->nomenclatureInst)."</th><th>".sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst)."</th><th>".(CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "")."</th></tr>"; |
|
118 | 118 | foreach ($myFeds as $fed_id => $fed_name) { |
119 | 119 | /// nomenclature 'fed', fed name, nomenclature 'inst' |
120 | - echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst) . "</strong></td></tr>"; |
|
120 | + echo "<tr><td colspan='3'><strong>".sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst)."</strong></td></tr>"; |
|
121 | 121 | |
122 | 122 | $fed_idps = $my_idps[$fed_id]; |
123 | 123 | asort($fed_idps); |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $oneinst = $instlist[$index]; |
126 | 126 | $the_inst = $oneinst['object']; |
127 | 127 | |
128 | - echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>" . $oneinst['name'] . "</a></td><td>"; |
|
128 | + echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>".$oneinst['name']."</a></td><td>"; |
|
129 | 129 | echo "<input type='hidden' name='inst' value='$the_inst->identifier'>"; |
130 | 130 | $admins = $the_inst->listOwners(); |
131 | 131 | $blessedUser = FALSE; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $coadmin = new \core\User($username['ID']); |
135 | 135 | $coadmin_name = $coadmin->getAttributes('user:realname'); |
136 | 136 | if (count($coadmin_name) > 0) { |
137 | - echo $coadmin_name[0]['value'] . "<br/>"; |
|
137 | + echo $coadmin_name[0]['value']."<br/>"; |
|
138 | 138 | unset($admins[$number]); |
139 | 139 | } |
140 | 140 | } else { // don't list self |
@@ -146,31 +146,31 @@ discard block |
||
146 | 146 | } |
147 | 147 | $otherAdminCount = count($admins); // only the unnamed remain |
148 | 148 | if ($otherAdminCount > 0) { |
149 | - echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount),$otherAdminCount); |
|
149 | + echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount), $otherAdminCount); |
|
150 | 150 | } |
151 | 151 | echo "</td><td>"; |
152 | 152 | $isAdminMgmtAvailable = FALSE; |
153 | 153 | if ($blessedUser && CONFIG['DB']['INST']['readonly'] === FALSE) { |
154 | 154 | $isAdminMgmtAvailable = TRUE; |
155 | 155 | } |
156 | - echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit' ". ($isAdminMgmtAvailable ? "" : "disabled") .">" . _("Add/Remove Administrators") . "</button></form></div>"; |
|
156 | + echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit' ".($isAdminMgmtAvailable ? "" : "disabled").">"._("Add/Remove Administrators")."</button></form></div>"; |
|
157 | 157 | echo "</td></tr>"; |
158 | 158 | } |
159 | 159 | } |
160 | 160 | echo "</table>"; |
161 | 161 | } else { |
162 | - echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>"; |
|
162 | + echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>"; |
|
163 | 163 | } |
164 | 164 | if (CONFIG['DB']['INST']['readonly'] === FALSE) { |
165 | 165 | if (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL) { |
166 | - echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; |
|
166 | + echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst)."</p>"; |
|
167 | 167 | echo "<hr/> |
168 | 168 | <div style='white-space: nowrap;'> |
169 | 169 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . |
170 | - sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst) . |
|
170 | + sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst). |
|
171 | 171 | " <input type='text' id='token' name='token'/> |
172 | 172 | <button type='submit'>" . |
173 | - _("Go!") . " |
|
173 | + _("Go!")." |
|
174 | 174 | </button> |
175 | 175 | </form> |
176 | 176 | </div>"; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | <div style='white-space: nowrap;'> |
180 | 180 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> |
181 | 181 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . |
182 | - sprintf(_("New %s Registration"), $uiElements->nomenclatureInst) . " |
|
182 | + sprintf(_("New %s Registration"), $uiElements->nomenclatureInst)." |
|
183 | 183 | </button> |
184 | 184 | </form> |
185 | 185 | </div>"; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | use \Exception; |
37 | 37 | |
38 | -require_once dirname(dirname(__DIR__)) . "/config/_config.php"; |
|
38 | +require_once dirname(dirname(__DIR__))."/config/_config.php"; |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Test suite to verify that an EAP setup is actually working as advertised in |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | } |
169 | 169 | } |
170 | 170 | |
171 | - $this->loggerInstance->debug(4, "RADIUSTests is in opMode " . $this->opMode . ", parameters were: $realm, $outerUsernameForChecks, " . print_r($supportedEapTypes, true)); |
|
171 | + $this->loggerInstance->debug(4, "RADIUSTests is in opMode ".$this->opMode.", parameters were: $realm, $outerUsernameForChecks, ".print_r($supportedEapTypes, true)); |
|
172 | 172 | $this->loggerInstance->debug(4, print_r($expectedServerNames, true)); |
173 | 173 | $this->loggerInstance->debug(4, print_r($expectedCABundle, true)); |
174 | 174 | |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | $returnarray[] = RADIUSTests::CERTPROB_WILDCARD_IN_NAME; |
259 | 259 | continue; // otherwise we'd ALSO complain that it's not a real hostname |
260 | 260 | } |
261 | - if ($onename != "" && filter_var("foo@" . idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) { |
|
261 | + if ($onename != "" && filter_var("foo@".idn_to_ascii($onename), FILTER_VALIDATE_EMAIL) === FALSE) { |
|
262 | 262 | $returnarray[] = RADIUSTests::CERTPROB_NOT_A_HOSTNAME; |
263 | 263 | } |
264 | 264 | } |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | if (preg_match("/sha1/i", $intermediateCa['full_details']['signatureTypeSN'])) { |
285 | 285 | $returnarray[] = RADIUSTests::CERTPROB_SHA1_SIGNATURE; |
286 | 286 | } |
287 | - $this->loggerInstance->debug(4, "CERT IS: " . print_r($intermediateCa, TRUE)); |
|
287 | + $this->loggerInstance->debug(4, "CERT IS: ".print_r($intermediateCa, TRUE)); |
|
288 | 288 | if ($intermediateCa['basicconstraints_set'] == 0) { |
289 | 289 | $returnarray[] = RADIUSTests::CERTPROB_NO_BASICCONSTRAINTS; |
290 | 290 | } |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | { |
334 | 334 | // for EAP-TLS to be a viable option, we need to pass a random client cert to make eapol_test happy |
335 | 335 | // the following PEM data is one of the SENSE EAPLab client certs (not secret at all) |
336 | - $clientcert = file_get_contents(dirname(__FILE__) . "/clientcert.p12"); |
|
336 | + $clientcert = file_get_contents(dirname(__FILE__)."/clientcert.p12"); |
|
337 | 337 | if ($clientcert === FALSE) { |
338 | 338 | throw new Exception("A dummy client cert is part of the source distribution, but could not be loaded!"); |
339 | 339 | } |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | if ($this->opMode == self::RADIUS_TEST_OPERATION_MODE_THOROUGH) { |
343 | 343 | return $this->udpLogin($probeindex, $this->supportedEapTypes[0]->getArrayRep(), $this->outerUsernameForChecks, 'eaplab', $opnameCheck, $frag, $clientcert); |
344 | 344 | } |
345 | - return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@" . $this->realm, 'eaplab', $opnameCheck, $frag, $clientcert); |
|
345 | + return $this->udpLogin($probeindex, \core\common\EAP::EAPTYPE_ANY, "cat-connectivity-test@".$this->realm, 'eaplab', $opnameCheck, $frag, $clientcert); |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | /** |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | return RADIUSTests::CERTPROB_NO_CDP_HTTP; |
364 | 364 | } |
365 | 365 | // first and second sub-match is the full URL... check it |
366 | - $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1] . $crlUrl[2])); |
|
366 | + $crlcontent = \core\common\OutsideComm::downloadFile(trim($crlUrl[1].$crlUrl[2])); |
|
367 | 367 | if ($crlcontent === FALSE) { |
368 | 368 | return RADIUSTests::CERTPROB_NO_CRL_AT_CDP_URL; |
369 | 369 | } |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | |
378 | 378 | // $pem = chunk_split(base64_encode($crlcontent), 64, "\n"); |
379 | 379 | // inspired by https://stackoverflow.com/questions/2390604/how-to-pass-variables-as-stdin-into-command-line-from-php |
380 | - $proc = CONFIG['PATHS']['openssl'] . " crl -inform der"; |
|
380 | + $proc = CONFIG['PATHS']['openssl']." crl -inform der"; |
|
381 | 381 | $descriptorspec = [ |
382 | 382 | 0 => ["pipe", "r"], |
383 | 383 | 1 => ["pipe", "w"], |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | $origLength = strlen($hex); |
417 | 417 | for ($i = 1; $i < $origLength; $i++) { |
418 | 418 | if ($i % 2 == 1 && $i != strlen($hex)) { |
419 | - $spaced .= $hex[$i] . " "; |
|
419 | + $spaced .= $hex[$i]." "; |
|
420 | 420 | } else { |
421 | 421 | $spaced .= $hex[$i]; |
422 | 422 | } |
@@ -543,19 +543,19 @@ discard block |
||
543 | 543 | $eapText = \core\common\EAP::eapDisplayName($eaptype); |
544 | 544 | $config = ' |
545 | 545 | network={ |
546 | - ssid="' . CONFIG['APPEARANCE']['productname'] . ' testing" |
|
546 | + ssid="' . CONFIG['APPEARANCE']['productname'].' testing" |
|
547 | 547 | key_mgmt=WPA-EAP |
548 | 548 | proto=WPA2 |
549 | 549 | pairwise=CCMP |
550 | 550 | group=CCMP |
551 | 551 | '; |
552 | 552 | // phase 1 |
553 | - $config .= 'eap=' . $eapText['OUTER'] . "\n"; |
|
553 | + $config .= 'eap='.$eapText['OUTER']."\n"; |
|
554 | 554 | $logConfig = $config; |
555 | 555 | // phase 2 if applicable; all inner methods have passwords |
556 | 556 | if (isset($eapText['INNER']) && $eapText['INNER'] != "") { |
557 | - $config .= ' phase2="auth=' . $eapText['INNER'] . "\"\n"; |
|
558 | - $logConfig .= ' phase2="auth=' . $eapText['INNER'] . "\"\n"; |
|
557 | + $config .= ' phase2="auth='.$eapText['INNER']."\"\n"; |
|
558 | + $logConfig .= ' phase2="auth='.$eapText['INNER']."\"\n"; |
|
559 | 559 | } |
560 | 560 | // all methods set a password, except EAP-TLS |
561 | 561 | if ($eaptype != \core\common\EAP::EAPTYPE_TLS) { |
@@ -571,11 +571,11 @@ discard block |
||
571 | 571 | } |
572 | 572 | |
573 | 573 | // inner identity |
574 | - $config .= ' identity="' . $inner . "\"\n"; |
|
575 | - $logConfig .= ' identity="' . $inner . "\"\n"; |
|
574 | + $config .= ' identity="'.$inner."\"\n"; |
|
575 | + $logConfig .= ' identity="'.$inner."\"\n"; |
|
576 | 576 | // outer identity, may be equal |
577 | - $config .= ' anonymous_identity="' . $outer . "\"\n"; |
|
578 | - $logConfig .= ' anonymous_identity="' . $outer . "\"\n"; |
|
577 | + $config .= ' anonymous_identity="'.$outer."\"\n"; |
|
578 | + $logConfig .= ' anonymous_identity="'.$outer."\"\n"; |
|
579 | 579 | // done |
580 | 580 | $config .= "}"; |
581 | 581 | $logConfig .= "}"; |
@@ -638,13 +638,13 @@ discard block |
||
638 | 638 | */ |
639 | 639 | private function eapolTestConfig($probeindex, $opName, $frag) |
640 | 640 | { |
641 | - $cmdline = CONFIG_DIAGNOSTICS['PATHS']['eapol_test'] . |
|
642 | - " -a " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['ip'] . |
|
643 | - " -s " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['secret'] . |
|
644 | - " -o serverchain.pem" . |
|
645 | - " -c ./udp_login_test.conf" . |
|
646 | - " -M 22:44:66:CA:20:" . sprintf("%02d", $probeindex) . " " . |
|
647 | - " -t " . CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['timeout'] . " "; |
|
641 | + $cmdline = CONFIG_DIAGNOSTICS['PATHS']['eapol_test']. |
|
642 | + " -a ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['ip']. |
|
643 | + " -s ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['secret']. |
|
644 | + " -o serverchain.pem". |
|
645 | + " -c ./udp_login_test.conf". |
|
646 | + " -M 22:44:66:CA:20:".sprintf("%02d", $probeindex)." ". |
|
647 | + " -t ".CONFIG_DIAGNOSTICS['RADIUSTESTS']['UDP-hosts'][$probeindex]['timeout']." "; |
|
648 | 648 | if ($opName) { |
649 | 649 | $cmdline .= '-N126:s:"1cat.eduroam.org" '; |
650 | 650 | } |
@@ -674,10 +674,10 @@ discard block |
||
674 | 674 | */ |
675 | 675 | private function createCArepository($tmpDir, &$intermOdditiesCAT, $servercert, $eapIntermediates, $eapIntermediateCRLs) |
676 | 676 | { |
677 | - if (!mkdir($tmpDir . "/root-ca-allcerts/", 0700, true)) { |
|
677 | + if (!mkdir($tmpDir."/root-ca-allcerts/", 0700, true)) { |
|
678 | 678 | throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-allcerts/\n"); |
679 | 679 | } |
680 | - if (!mkdir($tmpDir . "/root-ca-eaponly/", 0700, true)) { |
|
680 | + if (!mkdir($tmpDir."/root-ca-eaponly/", 0700, true)) { |
|
681 | 681 | throw new Exception("unable to create root CA directory (RADIUS Tests): $tmpDir/root-ca-eaponly/\n"); |
682 | 682 | } |
683 | 683 | // make a copy of the EAP-received chain and add the configured intermediates, if any |
@@ -691,15 +691,15 @@ discard block |
||
691 | 691 | } |
692 | 692 | if ($decoded['ca'] == 1) { |
693 | 693 | if ($decoded['root'] == 1) { // save CAT roots to the root directory |
694 | - file_put_contents($tmpDir . "/root-ca-eaponly/configuredroot" . count($catRoots) . ".pem", $decoded['pem']); |
|
695 | - file_put_contents($tmpDir . "/root-ca-allcerts/configuredroot" . count($catRoots) . ".pem", $decoded['pem']); |
|
694 | + file_put_contents($tmpDir."/root-ca-eaponly/configuredroot".count($catRoots).".pem", $decoded['pem']); |
|
695 | + file_put_contents($tmpDir."/root-ca-allcerts/configuredroot".count($catRoots).".pem", $decoded['pem']); |
|
696 | 696 | $catRoots[] = $decoded['pem']; |
697 | 697 | } else { // save the intermediates to allcerts directory |
698 | - file_put_contents($tmpDir . "/root-ca-allcerts/cat-intermediate" . count($catIntermediates) . ".pem", $decoded['pem']); |
|
698 | + file_put_contents($tmpDir."/root-ca-allcerts/cat-intermediate".count($catIntermediates).".pem", $decoded['pem']); |
|
699 | 699 | $intermOdditiesCAT = array_merge($intermOdditiesCAT, $this->propertyCheckIntermediate($decoded)); |
700 | 700 | if (isset($decoded['CRL']) && isset($decoded['CRL'][0])) { |
701 | 701 | $this->loggerInstance->debug(4, "got an intermediate CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain"); |
702 | - file_put_contents($tmpDir . "/root-ca-allcerts/crl_cat" . count($catIntermediates) . ".pem", $decoded['CRL'][0]); |
|
702 | + file_put_contents($tmpDir."/root-ca-allcerts/crl_cat".count($catIntermediates).".pem", $decoded['CRL'][0]); |
|
703 | 703 | } |
704 | 704 | $catIntermediates[] = $decoded['pem']; |
705 | 705 | } |
@@ -708,26 +708,26 @@ discard block |
||
708 | 708 | // save all intermediate certificates and CRLs to separate files in |
709 | 709 | // both root-ca directories |
710 | 710 | foreach ($eapIntermediates as $index => $onePem) { |
711 | - file_put_contents($tmpDir . "/root-ca-eaponly/intermediate$index.pem", $onePem); |
|
712 | - file_put_contents($tmpDir . "/root-ca-allcerts/intermediate$index.pem", $onePem); |
|
711 | + file_put_contents($tmpDir."/root-ca-eaponly/intermediate$index.pem", $onePem); |
|
712 | + file_put_contents($tmpDir."/root-ca-allcerts/intermediate$index.pem", $onePem); |
|
713 | 713 | } |
714 | 714 | foreach ($eapIntermediateCRLs as $index => $onePem) { |
715 | - file_put_contents($tmpDir . "/root-ca-eaponly/intermediateCRL$index.pem", $onePem); |
|
716 | - file_put_contents($tmpDir . "/root-ca-allcerts/intermediateCRL$index.pem", $onePem); |
|
715 | + file_put_contents($tmpDir."/root-ca-eaponly/intermediateCRL$index.pem", $onePem); |
|
716 | + file_put_contents($tmpDir."/root-ca-allcerts/intermediateCRL$index.pem", $onePem); |
|
717 | 717 | } |
718 | 718 | |
719 | 719 | $checkstring = ""; |
720 | 720 | if (isset($servercert['CRL']) && isset($servercert['CRL'][0])) { |
721 | 721 | $this->loggerInstance->debug(4, "got a server CRL; adding them to the chain checks. (Remember: checking end-entity cert only, not the whole chain"); |
722 | 722 | $checkstring = "-crl_check_all"; |
723 | - file_put_contents($tmpDir . "/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]); |
|
724 | - file_put_contents($tmpDir . "/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]); |
|
723 | + file_put_contents($tmpDir."/root-ca-eaponly/crl-server.pem", $servercert['CRL'][0]); |
|
724 | + file_put_contents($tmpDir."/root-ca-allcerts/crl-server.pem", $servercert['CRL'][0]); |
|
725 | 725 | } |
726 | 726 | |
727 | 727 | |
728 | 728 | // now c_rehash the root CA directory ... |
729 | - system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash'] . " $tmpDir/root-ca-eaponly/ > /dev/null"); |
|
730 | - system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash'] . " $tmpDir/root-ca-allcerts/ > /dev/null"); |
|
729 | + system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash']." $tmpDir/root-ca-eaponly/ > /dev/null"); |
|
730 | + system(CONFIG_DIAGNOSTICS['PATHS']['c_rehash']." $tmpDir/root-ca-allcerts/ > /dev/null"); |
|
731 | 731 | return $checkstring; |
732 | 732 | } |
733 | 733 | |
@@ -760,12 +760,12 @@ discard block |
||
760 | 760 | // so test if there's something PEMy in the file at all |
761 | 761 | // serverchain.pem is the output from eapol_test; incomingserver.pem is written by extractIncomingCertsfromEAP() if there was at least one server cert. |
762 | 762 | if (filesize("$tmpDir/serverchain.pem") > 10 && filesize("$tmpDir/incomingserver.pem") > 10) { |
763 | - exec(CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly); |
|
764 | - $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n"); |
|
765 | - $this->loggerInstance->debug(4, "Chain verify pass 1: " . print_r($verifyResultEaponly, TRUE) . "\n"); |
|
766 | - exec(CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts); |
|
767 | - $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl'] . " verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n"); |
|
768 | - $this->loggerInstance->debug(4, "Chain verify pass 2: " . print_r($verifyResultAllcerts, TRUE) . "\n"); |
|
763 | + exec(CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/incomingserver.pem", $verifyResultEaponly); |
|
764 | + $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-eaponly/ -purpose any $tmpDir/serverchain.pem\n"); |
|
765 | + $this->loggerInstance->debug(4, "Chain verify pass 1: ".print_r($verifyResultEaponly, TRUE)."\n"); |
|
766 | + exec(CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/incomingserver.pem", $verifyResultAllcerts); |
|
767 | + $this->loggerInstance->debug(4, CONFIG['PATHS']['openssl']." verify $crlCheckString -CApath $tmpDir/root-ca-allcerts/ -purpose any $tmpDir/serverchain.pem\n"); |
|
768 | + $this->loggerInstance->debug(4, "Chain verify pass 2: ".print_r($verifyResultAllcerts, TRUE)."\n"); |
|
769 | 769 | } |
770 | 770 | |
771 | 771 | |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | // we are UNHAPPY if no names match! |
833 | 833 | $happiness = "UNHAPPY"; |
834 | 834 | foreach ($this->expectedServerNames as $expectedName) { |
835 | - $this->loggerInstance->debug(4, "Managing expectations for $expectedName: " . print_r($servercert['CN'], TRUE) . print_r($servercert['sAN_DNS'], TRUE)); |
|
835 | + $this->loggerInstance->debug(4, "Managing expectations for $expectedName: ".print_r($servercert['CN'], TRUE).print_r($servercert['sAN_DNS'], TRUE)); |
|
836 | 836 | if (array_search($expectedName, $servercert['CN']) !== FALSE && array_search($expectedName, $servercert['sAN_DNS']) !== FALSE) { |
837 | 837 | $this->loggerInstance->debug(4, "Totally happy!"); |
838 | 838 | $happiness = "TOTALLY"; |
@@ -877,11 +877,11 @@ discard block |
||
877 | 877 | $theconfigs = $this->wpaSupplicantConfig($eaptype, $finalInner, $finalOuter, $password); |
878 | 878 | // the config intentionally does not include CA checking. We do this |
879 | 879 | // ourselves after getting the chain with -o. |
880 | - file_put_contents($tmpDir . "/udp_login_test.conf", $theconfigs[0]); |
|
880 | + file_put_contents($tmpDir."/udp_login_test.conf", $theconfigs[0]); |
|
881 | 881 | |
882 | 882 | $cmdline = $this->eapolTestConfig($probeindex, $opnameCheck, $frag); |
883 | 883 | $this->loggerInstance->debug(4, "Shallow reachability check cmdline: $cmdline\n"); |
884 | - $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n" . $theconfigs[1] . "\n"); |
|
884 | + $this->loggerInstance->debug(4, "Shallow reachability check config: $tmpDir\n".$theconfigs[1]."\n"); |
|
885 | 885 | $time_start = microtime(true); |
886 | 886 | $pflow = []; |
887 | 887 | exec($cmdline, $pflow); |
@@ -890,7 +890,7 @@ discard block |
||
890 | 890 | } |
891 | 891 | $time_stop = microtime(true); |
892 | 892 | $output = print_r($this->redact($password, $pflow), TRUE); |
893 | - file_put_contents($tmpDir . "/eapol_test_output_redacted_$probeindex.txt", $output); |
|
893 | + file_put_contents($tmpDir."/eapol_test_output_redacted_$probeindex.txt", $output); |
|
894 | 894 | $this->loggerInstance->debug(5, "eapol_test output saved to eapol_test_output_redacted_$probeindex.txt\n"); |
895 | 895 | return [ |
896 | 896 | "time" => ($time_stop - $time_start) * 1000, |
@@ -927,7 +927,7 @@ discard block |
||
927 | 927 | if ($packetflow[count($packetflow) - 1] == 3 && $this->checkLineparse($packetflow_orig, self::LINEPARSE_CHECK_REJECTIGNORE)) { |
928 | 928 | array_pop($packetflow); |
929 | 929 | } |
930 | - $this->loggerInstance->debug(5, "Packetflow: " . print_r($packetflow, TRUE)); |
|
930 | + $this->loggerInstance->debug(5, "Packetflow: ".print_r($packetflow, TRUE)); |
|
931 | 931 | $packetcount = array_count_values($packetflow); |
932 | 932 | $testresults['packetcount'] = $packetcount; |
933 | 933 | $testresults['packetflow'] = $packetflow; |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | private function wasModernTlsNegotiated(&$testresults, $packetflow_orig) |
970 | 970 | { |
971 | 971 | $negotiatedTlsVersion = $this->checkLineparse($packetflow_orig, self::LINEPARSE_TLSVERSION); |
972 | - $this->loggerInstance->debug(4,"TLS version found is: $negotiatedTlsVersion"."\n"); |
|
972 | + $this->loggerInstance->debug(4, "TLS version found is: $negotiatedTlsVersion"."\n"); |
|
973 | 973 | if ($negotiatedTlsVersion === FALSE) { |
974 | 974 | $testresults['cert_oddities'][] = RADIUSTests::TLSPROB_UNKNOWN_TLS_VERSION; |
975 | 975 | } elseif ($negotiatedTlsVersion != self::TLS_VERSION_1_2 && $negotiatedTlsVersion != self::TLS_VERSION_1_3) { |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | |
1030 | 1030 | $x509 = new \core\common\X509(); |
1031 | 1031 | // $eap_certarray holds all certs received in EAP conversation |
1032 | - $incomingData = file_get_contents($tmpDir . "/serverchain.pem"); |
|
1032 | + $incomingData = file_get_contents($tmpDir."/serverchain.pem"); |
|
1033 | 1033 | if ($incomingData !== FALSE && strlen($incomingData) > 0) { |
1034 | 1034 | $eapCertArray = $x509->splitCertificate($incomingData); |
1035 | 1035 | } else { |
@@ -1059,10 +1059,10 @@ discard block |
||
1059 | 1059 | case RADIUSTests::SERVER_CA_SELFSIGNED: |
1060 | 1060 | $servercert[] = $cert; |
1061 | 1061 | if (count($servercert) == 1) { |
1062 | - if (file_put_contents($tmpDir . "/incomingserver.pem", $certPem . "\n") === FALSE) { |
|
1062 | + if (file_put_contents($tmpDir."/incomingserver.pem", $certPem."\n") === FALSE) { |
|
1063 | 1063 | $this->loggerInstance->debug(4, "The (first) server certificate could not be written to $tmpDir/incomingserver.pem!\n"); |
1064 | 1064 | } |
1065 | - $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: " . print_r($servercert[0], true)); |
|
1065 | + $this->loggerInstance->debug(4, "This is the (first) server certificate, with CRL content if applicable: ".print_r($servercert[0], true)); |
|
1066 | 1066 | } elseif (!in_array(RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS, $testresults['cert_oddities'])) { |
1067 | 1067 | $testresults['cert_oddities'][] = RADIUSTests::CERTPROB_TOO_MANY_SERVER_CERTS; |
1068 | 1068 | } |
@@ -1143,7 +1143,7 @@ discard block |
||
1143 | 1143 | chdir($tmpDir); |
1144 | 1144 | $this->loggerInstance->debug(4, "temp dir: $tmpDir\n"); |
1145 | 1145 | if ($clientcertdata !== NULL) { |
1146 | - file_put_contents($tmpDir . "/client.p12", $clientcertdata); |
|
1146 | + file_put_contents($tmpDir."/client.p12", $clientcertdata); |
|
1147 | 1147 | } |
1148 | 1148 | $testresults = []; |
1149 | 1149 | // initialise the sub-array for cleaner parsing |
@@ -1250,7 +1250,7 @@ discard block |
||
1250 | 1250 | 'issuer' => $this->printDN($certdata['issuer']), |
1251 | 1251 | 'validFrom' => $this->printTm($certdata['validFrom_time_t']), |
1252 | 1252 | 'validTo' => $this->printTm($certdata['validTo_time_t']), |
1253 | - 'serialNumber' => $certdata['serialNumber'] . sprintf(" (0x%X)", $certdata['serialNumber']), |
|
1253 | + 'serialNumber' => $certdata['serialNumber'].sprintf(" (0x%X)", $certdata['serialNumber']), |
|
1254 | 1254 | 'sha1' => $certdata['sha1'], |
1255 | 1255 | 'extensions' => $certdata['extensions'] |
1256 | 1256 | ]; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * <base_url>/copyright.php after deploying the software |
20 | 20 | */ |
21 | 21 | |
22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
23 | 23 | |
24 | 24 | $auth = new \web\lib\admin\Authentication(); |
25 | 25 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $profile = $validator->Profile($_GET['profile_id'], $my_inst->identifier); |
57 | 57 | } else { |
58 | 58 | $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS); |
59 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $my_inst->identifier . " - Profile created"); |
|
59 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created"); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | if (!$profile instanceof \core\ProfileRADIUS) { |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | $uiElements = new web\lib\admin\UIElements(); |
119 | 119 | // set realm info, if submitted |
120 | 120 | if ($realm !== FALSE) { |
121 | - $profile->setRealm($anonLocal . "@" . $realm); |
|
121 | + $profile->setRealm($anonLocal."@".$realm); |
|
122 | 122 | echo $uiElements->boxOkay(sprintf(_("Realm: <strong>%s</strong>"), $realm)); |
123 | 123 | } else { |
124 | 124 | $profile->setRealm(""); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | echo $uiElements->boxError(_("Realm check username cannot be configured: realm is missing!")); |
145 | 145 | } else { |
146 | 146 | $profile->setRealmcheckUser(true, $checkuser_name); |
147 | - echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name . "@" . $realm)); |
|
147 | + echo $uiElements->boxOkay(sprintf(_("Special username for realm check is <strong>%s</strong>, the value is <strong>%s</strong>"), _("ON"), $checkuser_name."@".$realm)); |
|
148 | 148 | } |
149 | 149 | } else { |
150 | 150 | $profile->setRealmCheckUser(false); |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | $extratext = ""; |
157 | 157 | if (!empty($realm)) { |
158 | 158 | if ($hint !== FALSE) { |
159 | - $extratext = " " . sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
159 | + $extratext = " ".sprintf(_("The realm portion MUST be exactly '...@%s'."), $realm); |
|
160 | 160 | } else { |
161 | - $extratext = " " . sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
161 | + $extratext = " ".sprintf(_("The realm portion MUST end with '%s' but sub-realms of it are allowed (i.e. 'user@%s' and 'user@<...>.%s' are both acceptable)."), $realm, $realm, $realm); |
|
162 | 162 | } |
163 | 163 | } |
164 | - echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.") . $extratext); |
|
164 | + echo $uiElements->boxOkay(_("Where possible, supplicants will verify that username inputs contain a syntactically correct realm.").$extratext); |
|
165 | 165 | } else { |
166 | 166 | $profile->setInputVerificationPreference(false, false); |
167 | 167 | } |
@@ -193,30 +193,30 @@ discard block |
||
193 | 193 | echo $uiElements->boxOkay(_("Redirection is <strong>OFF</strong>")); |
194 | 194 | } |
195 | 195 | |
196 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $profile->identifier . " - attributes changed"); |
|
196 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$profile->identifier." - attributes changed"); |
|
197 | 197 | // reload the profile to ingest new CA and server names if any; before checking EAP completeness |
198 | 198 | $reloadedProfileNr1 = \core\ProfileFactory::instantiate($profile->identifier); |
199 | 199 | foreach (\core\common\EAP::listKnownEAPTypes() as $a) { |
200 | 200 | if ($a->getIntegerRep() == \core\common\EAP::INTEGER_SILVERBULLET) { // do not allow adding silverbullet via the backdoor |
201 | 201 | continue; |
202 | 202 | } |
203 | - if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep() . "-priority"]) && is_numeric($_POST[$a->getPrintableRep() . "-priority"])) { |
|
204 | - $priority = (int) $_POST[$a->getPrintableRep() . "-priority"]; |
|
203 | + if (isset($_POST[$a->getPrintableRep()]) && isset($_POST[$a->getPrintableRep()."-priority"]) && is_numeric($_POST[$a->getPrintableRep()."-priority"])) { |
|
204 | + $priority = (int) $_POST[$a->getPrintableRep()."-priority"]; |
|
205 | 205 | // add EAP type to profile as requested, but ... |
206 | 206 | $reloadedProfileNr1->addSupportedEapMethod($a, $priority); |
207 | - $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile " . $reloadedProfileNr1->identifier . " - supported EAP types changed"); |
|
207 | + $loggerInstance->writeAudit($_SESSION['user'], "MOD", "Profile ".$reloadedProfileNr1->identifier." - supported EAP types changed"); |
|
208 | 208 | // see if we can enable the EAP type, or if info is missing |
209 | 209 | $eapcompleteness = $reloadedProfileNr1->isEapTypeDefinitionComplete($a); |
210 | 210 | if ($eapcompleteness === true) { |
211 | - echo $uiElements->boxOkay(_("Supported EAP Type: ") . "<strong>" . $a->getPrintableRep() . "</strong>"); |
|
211 | + echo $uiElements->boxOkay(_("Supported EAP Type: ")."<strong>".$a->getPrintableRep()."</strong>"); |
|
212 | 212 | } else { |
213 | 213 | $warntext = ""; |
214 | 214 | if (is_array($eapcompleteness)) { |
215 | 215 | foreach ($eapcompleteness as $item) { |
216 | - $warntext .= "<strong>" . $uiElements->displayName($item) . "</strong> "; |
|
216 | + $warntext .= "<strong>".$uiElements->displayName($item)."</strong> "; |
|
217 | 217 | } |
218 | 218 | } |
219 | - echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext) . "<br/>" . _("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
219 | + echo $uiElements->boxWarning(sprintf(_("Supported EAP Type: <strong>%s</strong> is missing required information %s !"), $a->getPrintableRep(), $warntext)."<br/>"._("The EAP type was added to the profile, but you need to complete the missing information before we can produce installers for you.")); |
|
220 | 220 | } |
221 | 221 | } |
222 | 222 | } |
@@ -227,23 +227,23 @@ discard block |
||
227 | 227 | if (count($significantChanges) > 0) { |
228 | 228 | $myInstOriginal = new \core\IdP($profile->institution); |
229 | 229 | // send a notification/alert mail to someone we know is in charge |
230 | - $text = _("To whom it may concern,") . "\n\n"; |
|
230 | + $text = _("To whom it may concern,")."\n\n"; |
|
231 | 231 | /// were made to the *Identity Provider* *LU* / integer number of IdP / (previously known as) Name |
232 | - $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name) . "\n\n"; |
|
232 | + $text .= sprintf(_("significant changes were made to a RADIUS deployment profile of the %s %s / %s / '%s'."), $ui->nomenclatureInst, strtoupper($myInstOriginal->federation), $myInstOriginal->identifier, $myInstOriginal->name)."\n\n"; |
|
233 | 233 | if (isset($significantChanges[\core\AbstractProfile::CA_CLASH_ADDED])) { |
234 | - $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:") . "\n\n"; |
|
235 | - $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED] . "\n\n"; |
|
234 | + $text .= _("WARNING! A new trusted root CA was added, and it has the exact same name as a previously existing root CA. This may (but does not necessarily) mean that this is an attempt to insert an unauthorised trust root by disguising as the genuine one. The details are below:")."\n\n"; |
|
235 | + $text .= $significantChanges[\core\AbstractProfile::CA_CLASH_ADDED]."\n\n"; |
|
236 | 236 | } |
237 | 237 | if (isset($significantChanges[\core\AbstractProfile::CA_ADDED])) { |
238 | 238 | $text .= _("A new trusted root CA was added. The details are below:")."\n\n"; |
239 | - $text .= $significantChanges[\core\AbstractProfile::CA_ADDED] . "\n\n"; |
|
239 | + $text .= $significantChanges[\core\AbstractProfile::CA_ADDED]."\n\n"; |
|
240 | 240 | } |
241 | 241 | if (isset($significantChanges[\core\AbstractProfile::SERVERNAME_ADDED])) { |
242 | - $text .= _("A new acceptable server name for the authentication server was added. The details are below:") . "\n\n"; |
|
243 | - $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED] . "\n\n"; |
|
242 | + $text .= _("A new acceptable server name for the authentication server was added. The details are below:")."\n\n"; |
|
243 | + $text .= $significantChanges[\core\AbstractProfile::SERVERNAME_ADDED]."\n\n"; |
|
244 | 244 | } |
245 | - $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.") . "\n\n"; |
|
246 | - $text .= _("Greetings, ") . "\n\n" . CONFIG['APPEARANCE']['productname_long']; |
|
245 | + $text .= _("This mail is merely a cross-check because these changes can be security-relevant. If the change was expected, you do not need to take any action.")."\n\n"; |
|
246 | + $text .= _("Greetings, ")."\n\n".CONFIG['APPEARANCE']['productname_long']; |
|
247 | 247 | // (currently, send hard-wired to NRO - future: for linked insts, check eduroam DBv2 and send to registered admins directly) |
248 | 248 | $fed = new core\Federation($myInstOriginal->federation); |
249 | 249 | foreach ($fed->listFederationAdmins() as $id) { |
@@ -262,7 +262,7 @@ discard block |
||
262 | 262 | <?php |
263 | 263 | if (count($reloadedProfileNr2->getEapMethodsinOrderOfPreference(1)) > 0) { |
264 | 264 | echo "<form method='post' action='overview_installers.php?inst_id=$my_inst->identifier&profile_id=$reloadedProfileNr2->identifier' accept-charset='UTF-8'> |
265 | - <button type='submit'>" . _("Continue to Installer Fine-Tuning and Download") . "</button> |
|
265 | + <button type='submit'>"._("Continue to Installer Fine-Tuning and Download")."</button> |
|
266 | 266 | </form>"; |
267 | 267 | } |
268 | 268 | echo $deco->footer(); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $find = array_keys($displayNames, $input, TRUE); |
130 | 130 | |
131 | 131 | if (count($find) == 0) { // this is an error! throw an Exception |
132 | - throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input)); |
|
132 | + throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input)); |
|
133 | 133 | } |
134 | 134 | \core\common\Entity::outOfThePotatoes(); |
135 | 135 | return $find[0]; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | foreach ($optionlist as $option) { |
152 | 152 | $type = $optioninfo->optionType($option['name']); |
153 | - if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") { |
|
153 | + if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") { |
|
154 | 154 | // all non-multilang attribs get this assignment ... |
155 | 155 | $language = ""; |
156 | 156 | $content = $option['value']; |
@@ -168,19 +168,19 @@ discard block |
||
168 | 168 | $locationMarkers[] = $coords; |
169 | 169 | break; |
170 | 170 | case "file": |
171 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>"; |
|
171 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>"; |
|
172 | 172 | switch ($option['name']) { |
173 | 173 | case "general:logo_file": |
174 | 174 | case "fed:logo_file": |
175 | - $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
175 | + $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
176 | 176 | break; |
177 | 177 | case "eap:ca_file": |
178 | 178 | // fall-through intended: display both the same way |
179 | 179 | case "fed:minted_ca_file": |
180 | - $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
180 | + $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
181 | 181 | break; |
182 | 182 | case "support:info_file": |
183 | - $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']); |
|
183 | + $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']); |
|
184 | 184 | break; |
185 | 185 | default: |
186 | 186 | } |
@@ -190,10 +190,10 @@ discard block |
||
190 | 190 | // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen |
191 | 191 | break; |
192 | 192 | } |
193 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
193 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>"; |
|
194 | 194 | break; |
195 | 195 | default: |
196 | - $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
196 | + $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
|
197 | 197 | } |
198 | 198 | } |
199 | 199 | } |
@@ -202,11 +202,11 @@ discard block |
||
202 | 202 | $locationCount = 0; |
203 | 203 | foreach ($locationMarkers as $g) { |
204 | 204 | $locationCount++; |
205 | - $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />'; |
|
205 | + $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />'; |
|
206 | 206 | } |
207 | 207 | $marker .= '<\/markers>'; // some validator says this should be escaped |
208 | 208 | $jMarker = json_encode($locationMarkers); |
209 | - $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>'; |
|
209 | + $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>'; |
|
210 | 210 | } |
211 | 211 | \core\common\Entity::outOfThePotatoes(); |
212 | 212 | return $retval; |
@@ -222,11 +222,11 @@ discard block |
||
222 | 222 | \core\common\Entity::intoThePotatoes(); |
223 | 223 | $idpoptions = $myInst->getAttributes(); |
224 | 224 | $retval = "<div class='infobox'> |
225 | - <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2> |
|
225 | + <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2> |
|
226 | 226 | <table> |
227 | 227 | <tr> |
228 | 228 | <td> |
229 | - " . _("Country:") . " |
|
229 | + " . _("Country:")." |
|
230 | 230 | </td> |
231 | 231 | <td> |
232 | 232 | </td> |
@@ -236,16 +236,16 @@ discard block |
||
236 | 236 | $retval .= $myFed->name; |
237 | 237 | $retval .= "</strong> |
238 | 238 | </td> |
239 | - </tr>" . $this->infoblock($idpoptions, "general", "IdP") . " |
|
239 | + </tr>" . $this->infoblock($idpoptions, "general", "IdP")." |
|
240 | 240 | </table> |
241 | 241 | </div>"; |
242 | 242 | |
243 | 243 | $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]]; |
244 | 244 | foreach ($blocks as $block) { |
245 | 245 | $retval .= "<div class='infobox'> |
246 | - <h2>" . $block[1] . "</h2> |
|
246 | + <h2>" . $block[1]."</h2> |
|
247 | 247 | <table>" . |
248 | - $this->infoblock($idpoptions, $block[0], "IdP") . |
|
248 | + $this->infoblock($idpoptions, $block[0], "IdP"). |
|
249 | 249 | "</table> |
250 | 250 | </div>"; |
251 | 251 | } |
@@ -260,12 +260,12 @@ discard block |
||
260 | 260 | */ |
261 | 261 | private function displaySize(int $number) { |
262 | 262 | if ($number > 1024 * 1024) { |
263 | - return round($number / 1024 / 1024, 2) . " MiB"; |
|
263 | + return round($number / 1024 / 1024, 2)." MiB"; |
|
264 | 264 | } |
265 | 265 | if ($number > 1024) { |
266 | - return round($number / 1024, 2) . " KiB"; |
|
266 | + return round($number / 1024, 2)." KiB"; |
|
267 | 267 | } |
268 | - return $number . " B"; |
|
268 | + return $number." B"; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | /** |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | $this->checkROWIDpresence($cAReference); |
338 | 338 | $rawResult = UIElements::getBlobFromDB($cAReference, FALSE); |
339 | 339 | if (is_bool($rawResult)) { // we didn't actually get a CA! |
340 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>"; |
|
340 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>"; |
|
341 | 341 | \core\common\Entity::outOfThePotatoes(); |
342 | 342 | return $retval; |
343 | 343 | } |
@@ -353,14 +353,14 @@ discard block |
||
353 | 353 | |
354 | 354 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
355 | 355 | $details['name'] = preg_replace('/\//', "", $details['name']); |
356 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
357 | - $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
356 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
357 | + $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA")); |
|
358 | 358 | if ($details['ca'] == 0 && $details['root'] != 1) { |
359 | - $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
|
359 | + $retval = "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>"._("This is a <strong>SERVER</strong> certificate!")."<br/>".$details['name']."</div>"; |
|
360 | 360 | \core\common\Entity::outOfThePotatoes(); |
361 | 361 | return $retval; |
362 | 362 | } |
363 | - $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>"; |
|
363 | + $retval = "<div class='ca-summary' ><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:#0000ff; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>"; |
|
364 | 364 | \core\common\Entity::outOfThePotatoes(); |
365 | 365 | return $retval; |
366 | 366 | } |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | public function previewImageinHTML($imageReference) { |
375 | 375 | \core\common\Entity::intoThePotatoes(); |
376 | 376 | $this->checkROWIDpresence($imageReference); |
377 | - $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>"; |
|
377 | + $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>"; |
|
378 | 378 | \core\common\Entity::outOfThePotatoes(); |
379 | 379 | return $retval; |
380 | 380 | } |
@@ -390,13 +390,13 @@ discard block |
||
390 | 390 | $this->checkROWIDpresence($fileReference); |
391 | 391 | $fileBlob = UIElements::getBlobFromDB($fileReference, FALSE); |
392 | 392 | if (is_bool($fileBlob)) { // we didn't actually get a file! |
393 | - $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>"; |
|
393 | + $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>"; |
|
394 | 394 | \core\common\Entity::outOfThePotatoes(); |
395 | 395 | return $retval; |
396 | 396 | } |
397 | 397 | $decodedFileBlob = base64_decode($fileBlob); |
398 | 398 | $fileinfo = new \finfo(); |
399 | - $retval = "<div class='ca-summary'>" . _("File exists") . " (" . $fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE) . ", " . $this->displaySize(strlen($decodedFileBlob)) . ")<br/><a href='inc/filepreview.php?id=$fileReference'>" . _("Preview") . "</a></div>"; |
|
399 | + $retval = "<div class='ca-summary'>"._("File exists")." (".$fileinfo->buffer($decodedFileBlob, FILEINFO_MIME_TYPE).", ".$this->displaySize(strlen($decodedFileBlob)).")<br/><a href='inc/filepreview.php?id=$fileReference'>"._("Preview")."</a></div>"; |
|
400 | 400 | \core\common\Entity::outOfThePotatoes(); |
401 | 401 | return $retval; |
402 | 402 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | $retval .= "<tr><td>"; |
425 | 425 | } |
426 | 426 | $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']); |
427 | - $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>"; |
|
427 | + $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>"; |
|
428 | 428 | if (!$omittabletags) { |
429 | 429 | $retval .= "</td><td>"; |
430 | 430 | } |
@@ -504,8 +504,8 @@ discard block |
||
504 | 504 | return ""; |
505 | 505 | } |
506 | 506 | |
507 | - $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
508 | - $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png"); |
|
507 | + $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png"); |
|
508 | + $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png"); |
|
509 | 509 | if ($logogd === FALSE) { // consortium logo is bogus; don't do anything |
510 | 510 | return ""; |
511 | 511 | } |
@@ -520,8 +520,8 @@ discard block |
||
520 | 520 | $scale = sqrt($maxoccupy / $totallogopixels); |
521 | 521 | $loggerInstance->debug(4, "Scaling info: $scale, $maxoccupy, $totallogopixels\n"); |
522 | 522 | // determine final pixel size - round to multitude of $symbolsize to match exact symbol boundary |
523 | - $targetwidth = (int)($symbolsize * round($sizelogo[0] * $scale / $symbolsize)); |
|
524 | - $targetheight = (int)($symbolsize * round($sizelogo[1] * $scale / $symbolsize)); |
|
523 | + $targetwidth = (int) ($symbolsize * round($sizelogo[0] * $scale / $symbolsize)); |
|
524 | + $targetheight = (int) ($symbolsize * round($sizelogo[1] * $scale / $symbolsize)); |
|
525 | 525 | // paint white below the logo, in case it has transparencies (looks bad) |
526 | 526 | // have one symbol in each direction extra white space |
527 | 527 | $whiteimage = imagecreate($targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
@@ -530,8 +530,8 @@ discard block |
||
530 | 530 | } |
531 | 531 | imagecolorallocate($whiteimage, 255, 255, 255); |
532 | 532 | // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected |
533 | - $targetplacementx = (int)($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize)); |
|
534 | - $targetplacementy = (int)($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize)); |
|
533 | + $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize)); |
|
534 | + $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize)); |
|
535 | 535 | imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize); |
536 | 536 | imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]); |
537 | 537 | ob_start(); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | foreach ($idps as $idp) { |
38 | 38 | $idpTitle[$idp['entityID']] = $idp['title']; |
39 | 39 | $d = self::getIdpDistance($idp, $here); |
40 | - $resultSet[$idp['entityID']] = $d . " " . $idp['title']; |
|
40 | + $resultSet[$idp['entityID']] = $d." ".$idp['title']; |
|
41 | 41 | } |
42 | 42 | asort($resultSet); |
43 | 43 | $outarray = []; |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $allIDPs = ($country != "" ? $handle->exec($query, "s", $country) : $handle->exec($query)); |
80 | 80 | $returnarray = []; |
81 | 81 | // SELECTs never return a booleans, always an object |
82 | - $i=0; |
|
82 | + $i = 0; |
|
83 | 83 | while ($queryResult = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allIDPs)) { |
84 | 84 | $i++; |
85 | 85 | $institutionOptions = explode('---', $queryResult->options); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $geo = []; |
178 | 178 | $names = []; |
179 | 179 | $oneInstitutionResult['country'] = strtoupper($queryResult->country); |
180 | - $oneInstitutionResult['entityID'] = (int)$queryResult->inst_id; |
|
180 | + $oneInstitutionResult['entityID'] = (int) $queryResult->inst_id; |
|
181 | 181 | |
182 | 182 | foreach ($institutionOptions as $institutionOption) { |
183 | 183 | $opt = explode('===', $institutionOption); |
@@ -201,10 +201,10 @@ discard block |
||
201 | 201 | } |
202 | 202 | $oneInstitutionResult['names'] = $names; |
203 | 203 | if (count($geo) > 0) { |
204 | - $geoArray=[]; |
|
204 | + $geoArray = []; |
|
205 | 205 | foreach ($geo as $coords) { |
206 | - $geoArray[] = ['lon' => (float)$coords['lon'], |
|
207 | - 'lat' => (float)$coords['lat']]; |
|
206 | + $geoArray[] = ['lon' => (float) $coords['lon'], |
|
207 | + 'lat' => (float) $coords['lat']]; |
|
208 | 208 | } |
209 | 209 | $oneInstitutionResult['geo'] = $geoArray; |
210 | 210 | } |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | break; |
250 | 250 | case 'device-specific:redirect': |
251 | - $redirect = $opt[1] . ':' . $queryResult->device_id; |
|
251 | + $redirect = $opt[1].':'.$queryResult->device_id; |
|
252 | 252 | |
253 | 253 | break; |
254 | 254 | case 'profile:name': |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | } |
264 | 264 | if ($productionProfile) { |
265 | 265 | $idpArray[$idpId]['profiles'][] = |
266 | - ['id'=> (int)$queryResult->profile_id, |
|
266 | + ['id'=> (int) $queryResult->profile_id, |
|
267 | 267 | 'names'=> $profileNames, |
268 | 268 | 'redirect'=>$redirect]; |
269 | 269 | } |