@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | $lookFor .= "$name"; |
186 | 186 | } |
187 | - $finding = preg_match("/^(".$lookFor."):(.*)/", $oneRow->user_id, $matches); |
|
187 | + $finding = preg_match("/^(" . $lookFor . "):(.*)/", $oneRow->user_id, $matches); |
|
188 | 188 | if ($finding === 0 || $finding === FALSE) { |
189 | 189 | return FALSE; |
190 | 190 | } |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | case $providerStrings[3]: |
207 | 207 | case $providerStrings[4]: |
208 | 208 | case $providerStrings[5]: |
209 | - if (!in_array(User::PROVIDER_STRINGS[$matches[1]],$listOfProviders)) { |
|
209 | + if (!in_array(User::PROVIDER_STRINGS[$matches[1]], $listOfProviders)) { |
|
210 | 210 | $listOfProviders[] = User::PROVIDER_STRINGS[$matches[1]]; |
211 | 211 | } |
212 | 212 | break; |
@@ -134,7 +134,7 @@ |
||
134 | 134 | */ |
135 | 135 | public function string($input, $allowWhitespace = FALSE) { |
136 | 136 | // always chop out invalid characters, and surrounding whitespace |
137 | - $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input); |
|
137 | + $retvalStep0 = iconv("UTF-8", "UTF-8//TRANSLIT", $input); |
|
138 | 138 | if ($retvalStep0 === FALSE) { |
139 | 139 | throw new Exception("iconv failure for string sanitisation. With TRANSLIT, this should never happen!"); |
140 | 140 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if (isset($Cache[$entry])) { |
42 | 42 | continue; |
43 | 43 | } |
44 | - \core\common\Entity::rrmdir($downloads . '/' . $entry); |
|
44 | + \core\common\Entity::rrmdir($downloads . '/' . $entry); |
|
45 | 45 | print "$entry\n"; |
46 | 46 | } |
47 | 47 | closedir($handle); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if ($ftime < 3600) { |
57 | 57 | continue; |
58 | 58 | } |
59 | - \core\common\Entity::rrmdir($downloads . '/' . $entry); |
|
59 | + \core\common\Entity::rrmdir($downloads . '/' . $entry); |
|
60 | 60 | print "$entry\n"; |
61 | 61 | } |
62 | 62 | closedir($handle); |
@@ -11,15 +11,15 @@ |
||
11 | 11 | namespace devices\redirect_dev; |
12 | 12 | |
13 | 13 | class Device_RedirectDev extends \core\DeviceConfig { |
14 | - /** |
|
15 | - * Constructs a Device object. |
|
16 | - * |
|
17 | - * @final not to be redefined |
|
18 | - */ |
|
14 | + /** |
|
15 | + * Constructs a Device object. |
|
16 | + * |
|
17 | + * @final not to be redefined |
|
18 | + */ |
|
19 | 19 | final public function __construct() { |
20 | 20 | parent::__construct(); |
21 | - $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
22 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
21 | + $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
|
22 | + $this->loggerInstance->debug(4,"RedirectEx called"); |
|
23 | 23 | } |
24 | 24 | public function writeDeviceInfo() { |
25 | 25 | $out = "<p>"; |
@@ -19,7 +19,7 @@ |
||
19 | 19 | final public function __construct() { |
20 | 20 | parent::__construct(); |
21 | 21 | $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]); |
22 | - $this->loggerInstance->debug(4,"RedirectEx called"); |
|
22 | + $this->loggerInstance->debug(4, "RedirectEx called"); |
|
23 | 23 | } |
24 | 24 | public function writeDeviceInfo() { |
25 | 25 | $out = "<p>"; |
@@ -206,8 +206,7 @@ |
||
206 | 206 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/"); |
207 | 207 | } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) { |
208 | 208 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/"); |
209 | - } |
|
210 | - else { |
|
209 | + } else { |
|
211 | 210 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
212 | 211 | } |
213 | 212 |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | <select id='lang' name='lang' onchange='this.form.submit()'>"; |
66 | 66 | |
67 | 67 | foreach (CONFIG['LANGUAGES'] as $lang => $value) { |
68 | - $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $value['display'] . "</option> "; |
|
68 | + $retval .= "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "") . " >" . $value['display'] . "</option> "; |
|
69 | 69 | } |
70 | 70 | $retval .= "</select>"; |
71 | 71 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $retval .= "</form> |
78 | 78 | </div><!--langselection-->"; |
79 | 79 | |
80 | - $logoUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, (strrpos($_SERVER['PHP_SELF'], "admin/") !== FALSE ? strrpos($_SERVER['PHP_SELF'], "admin/") : strrpos($_SERVER['PHP_SELF'], "/")))."/resources/images/consortium_logo.png"; |
|
80 | + $logoUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, (strrpos($_SERVER['PHP_SELF'], "admin/") !== FALSE ? strrpos($_SERVER['PHP_SELF'], "admin/") : strrpos($_SERVER['PHP_SELF'], "/"))) . "/resources/images/consortium_logo.png"; |
|
81 | 81 | $retval .= "<div class='consortium_logo'> |
82 | 82 | <img id='test_locate' src='$logoUrl' alt='Consortium Logo'> |
83 | 83 | </div> <!-- consortium_logo --> |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $advancedControls = TRUE; |
121 | 121 | switch ($area) { |
122 | 122 | case "ADMIN-IDP": |
123 | - $cap2 = sprintf(_("Administrator Interface - Identity Provider"),$this->ui->nomenclature_inst); |
|
123 | + $cap2 = sprintf(_("Administrator Interface - Identity Provider"), $this->ui->nomenclature_inst); |
|
124 | 124 | break; |
125 | 125 | case "ADMIN-IDP-USERS": |
126 | 126 | $cap2 = sprintf(_("Administrator Interface - %s User Management"), \core\ProfileSilverbullet::PRODUCTNAME); |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | $cap2 = _("Management of User Details"); |
133 | 133 | break; |
134 | 134 | case "FEDERATION": |
135 | - $cap2 = sprintf(_("Administrator Interface - %s Management"),$this->ui->nomenclature_fed); |
|
135 | + $cap2 = sprintf(_("Administrator Interface - %s Management"), $this->ui->nomenclature_fed); |
|
136 | 136 | break; |
137 | 137 | case "USER": |
138 | 138 | $cap1 = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']); |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | // content from here on will SCROLL instead of being fixed at the top |
155 | 155 | $retval .= "<div class='pagecontent'>"; // closes in footer again |
156 | 156 | $retval .= "<div class='trick'>"; // closes in footer again |
157 | - $retval .= "<div id='secondrow' style='border-bottom:5px solid ".CONFIG['APPEARANCE']['colour1']."; min-height:100px;'> |
|
157 | + $retval .= "<div id='secondrow' style='border-bottom:5px solid " . CONFIG['APPEARANCE']['colour1'] . "; min-height:100px;'> |
|
158 | 158 | <div id='secondarycaptions' style='display:inline-block; float:left'> |
159 | 159 | <h2>$cap2</h2> |
160 | 160 | </div><!--secondarycaptions-->"; |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
200 | 200 | } |
201 | 201 | |
202 | - $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition )."/resources/css/cat.css.php"; |
|
202 | + $cssUrl = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/css/cat.css.php"; |
|
203 | 203 | |
204 | 204 | $retval .= "<link rel='stylesheet' type='text/css' href='$cssUrl' />"; |
205 | 205 | $retval .= "<title>" . htmlspecialchars($pagetitle) . "</title>"; |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
228 | 228 | } |
229 | 229 | |
230 | - $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition)."/resources/images"; |
|
230 | + $logoBase = "//" . $this->validator->hostname($_SERVER['SERVER_NAME']) . substr($_SERVER['PHP_SELF'], 0, $cutoffPosition) . "/resources/images"; |
|
231 | 231 | |
232 | 232 | return "<span id='logos' style='position:fixed; left:50%;'><img src='$logoBase/dante.png' alt='DANTE' style='height:23px;width:47px'/> |
233 | 233 | <img src='$logoBase/eu.png' alt='EU' style='height:23px;width:27px;border-width:0px;'/></span> |
@@ -246,11 +246,11 @@ discard block |
||
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | - * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
250 | - * |
|
251 | - * @param array $cert (returned from openssl_x509_parse) |
|
252 | - * @return array of OIDs |
|
253 | - */ |
|
249 | + * This function parses a X.509 cert and returns all certificatePolicies OIDs |
|
250 | + * |
|
251 | + * @param array $cert (returned from openssl_x509_parse) |
|
252 | + * @return array of OIDs |
|
253 | + */ |
|
254 | 254 | private function propertyCheckPolicy($cert) { |
255 | 255 | $oids = []; |
256 | 256 | if ($cert['extensions']['certificatePolicies']) { |
@@ -263,11 +263,11 @@ discard block |
||
263 | 263 | return $oids; |
264 | 264 | } |
265 | 265 | /** |
266 | - * This function parses a X.509 cert and returns the value of $field |
|
267 | - * |
|
268 | - * @param array $cert (returned from openssl_x509_parse) |
|
269 | - * @return string value of the issuer field or '' |
|
270 | - */ |
|
266 | + * This function parses a X.509 cert and returns the value of $field |
|
267 | + * |
|
268 | + * @param array $cert (returned from openssl_x509_parse) |
|
269 | + * @return string value of the issuer field or '' |
|
270 | + */ |
|
271 | 271 | private function getCertificateIssuer($cert) { |
272 | 272 | $issuer = ''; |
273 | 273 | foreach ($cert['issuer'] as $key => $val) { |
@@ -172,9 +172,9 @@ |
||
172 | 172 | $totalFailures = 0; |
173 | 173 | foreach ($decoded_response['messages'] as $message) { |
174 | 174 | if ($message['status'] == 0) { |
175 | - $loggerInstance->debug(2, $message['message-id']. ": Success"); |
|
175 | + $loggerInstance->debug(2, $message['message-id'] . ": Success"); |
|
176 | 176 | } else { |
177 | - $loggerInstance->debug(2, $message['message-id']. ": Failed (failure code = ".$message['status'].")"); |
|
177 | + $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")"); |
|
178 | 178 | $totalFailures++; |
179 | 179 | } |
180 | 180 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | <key>PayloadIdentifier</key> |
72 | 72 | <string>" . self::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
73 | 73 | <key>PayloadOrganization</key> |
74 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
74 | + <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ($this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
75 | 75 | <key>PayloadType</key> |
76 | 76 | <string>Configuration</string> |
77 | 77 | <key>PayloadUUID</key> |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | <key>PayloadVersion</key> |
480 | 480 | <integer>1</integer> |
481 | 481 | </dict>", |
482 | - "UUID" => $payloadUUID,]; |
|
482 | + "UUID" => $payloadUUID, ]; |
|
483 | 483 | } |
484 | 484 | |
485 | 485 | private function expiryBlock() { |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | public function listIdPs() { |
143 | 143 | $instList = $this->orderIdentityProviders($this->country->identifier); |
144 | 144 | $out = ''; |
145 | - $out .= sprintf(_("Select your %s"), $this->nomenclature_inst ); |
|
145 | + $out .= sprintf(_("Select your %s"), $this->nomenclature_inst); |
|
146 | 146 | $out .= '<select name="idp" onchange="submit_form(this)">'; |
147 | 147 | if (!empty($instList)) { |
148 | 148 | if (!isset($this->idp)) { |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } |
237 | 237 | } |
238 | 238 | $out .= '>' . $disp . '</option>'; |
239 | - $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ( $oneDevice['redirect'] ? 1 : 0 ) . ';'; |
|
239 | + $deviceRedirects .= 'redirects[' . $iterator . '] = ' . ($oneDevice['redirect'] ? 1 : 0) . ';'; |
|
240 | 240 | $iterator++; |
241 | 241 | } |
242 | 242 | $out .= '</select>'; |
@@ -430,7 +430,7 @@ discard block |
||
430 | 430 | </script> |
431 | 431 | </head> |
432 | 432 | <body style=""> |
433 | - <?php print '<div id="motd">' . ( isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ' ) . '</div>'; ?> |
|
433 | + <?php print '<div id="motd">' . (isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : ' ') . '</div>'; ?> |
|
434 | 434 | <form name="my_form" method="POST" action="<?php echo $_SERVER['SCRIPT_NAME'] ?>" accept-charset='UTF-8'> |
435 | 435 | <img src="<?php echo $skinObject->findResourceUrl("IMAGES", "consortium_logo.png"); ?>" style="width: 20%; padding-right:20px; padding-top:0px; float:right" alt="logo" /> |
436 | 436 | <?php |