Passed
Push — release_2_0 ( 0d5fd5...cf68a9 )
by Maja
08:03
created
core/common/OutsideComm.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no MX.");
118 118
             return OutsideComm::MAILDOMAIN_NO_MX;
119 119
         }
120
-        $loggerInstance->debug(5, "Domain: $domain MX: " . print_r($mx, TRUE));
120
+        $loggerInstance->debug(5, "Domain: $domain MX: ".print_r($mx, TRUE));
121 121
         // create a pool of A and AAAA records for all the MXes
122 122
         $ipAddrs = [];
123 123
         foreach ($mx as $onemx) {
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
                 $ipAddrs[] = $oneipv4['ip'];
128 128
             }
129 129
             foreach ($v6list as $oneipv6) {
130
-                $ipAddrs[] = "[" . $oneipv6['ipv6'] . "]";
130
+                $ipAddrs[] = "[".$oneipv6['ipv6']."]";
131 131
             }
132 132
         }
133 133
         if (count($ipAddrs) == 0) {
134 134
             $loggerInstance->debug(4, "OutsideComm::mailAddressValidSecure: no mailserver hosts.");
135 135
             return OutsideComm::MAILDOMAIN_NO_HOST;
136 136
         }
137
-        $loggerInstance->debug(5, "Domain: $domain Addrs: " . print_r($ipAddrs, TRUE));
137
+        $loggerInstance->debug(5, "Domain: $domain Addrs: ".print_r($ipAddrs, TRUE));
138 138
         // connect to all hosts. If all can't connect, return MAILDOMAIN_NO_CONNECT. 
139 139
         // If at least one does not support STARTTLS or one of the hosts doesn't connect
140 140
         // , return MAILDOMAIN_NO_STARTTLS (one which we can't connect to we also
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         switch (CONFIG_CONFASSISTANT['SMSSETTINGS']['provider']) {
187 187
             case 'Nexmo':
188 188
                 // taken from https://docs.nexmo.com/messaging/sms-api
189
-                $url = 'https://rest.nexmo.com/sms/json?' . http_build_query(
189
+                $url = 'https://rest.nexmo.com/sms/json?'.http_build_query(
190 190
                                 [
191 191
                                     'api_key' => CONFIG_CONFASSISTANT['SMSSETTINGS']['username'],
192 192
                                     'api_secret' => CONFIG_CONFASSISTANT['SMSSETTINGS']['password'],
@@ -211,14 +211,14 @@  discard block
 block discarded – undo
211 211
                     $loggerInstance->debug(2, 'Problem with SMS invitation: no message was sent!');
212 212
                     return OutsideComm::SMS_NOTSENT;
213 213
                 }
214
-                $loggerInstance->debug(2, 'Total of ' . $messageCount . ' messages were attempted to send.');
214
+                $loggerInstance->debug(2, 'Total of '.$messageCount.' messages were attempted to send.');
215 215
 
216 216
                 $totalFailures = 0;
217 217
                 foreach ($decoded_response['messages'] as $message) {
218 218
                     if ($message['status'] == 0) {
219
-                        $loggerInstance->debug(2, $message['message-id'] . ": Success");
219
+                        $loggerInstance->debug(2, $message['message-id'].": Success");
220 220
                     } else {
221
-                        $loggerInstance->debug(2, $message['message-id'] . ": Failed (failure code = " . $message['status'] . ")");
221
+                        $loggerInstance->debug(2, $message['message-id'].": Failed (failure code = ".$message['status'].")");
222 222
                         $totalFailures++;
223 223
                     }
224 224
                 }
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
             $proto = "https://";
271 271
         }
272 272
         // then, send out the mail
273
-        $message = _("Hello,") . "\n\n" . wordwrap($introTexts[$introtext] . " " . $validity, 72) . "\n\n";
273
+        $message = _("Hello,")."\n\n".wordwrap($introTexts[$introtext]." ".$validity, 72)."\n\n";
274 274
         // default means we don't have a Reply-To.
275 275
         $replyToMessage = wordwrap(_("manually. Please do not reply to this mail; this is a send-only address."));
276 276
 
@@ -278,8 +278,8 @@  discard block
 block discarded – undo
278 278
             // see if we are supposed to add a custom message
279 279
             $customtext = $federation->getAttributes('fed:custominvite');
280 280
             if (count($customtext) > 0) {
281
-                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72) . "\n---------------------------------" .
282
-                        wordwrap($customtext[0]['value'], 72) . "\n---------------------------------\n\n";
281
+                $message .= wordwrap(sprintf(_("Additional message from your %s administrator:"), Entity::$nomenclature_fed), 72)."\n---------------------------------".
282
+                        wordwrap($customtext[0]['value'], 72)."\n---------------------------------\n\n";
283 283
             }
284 284
             // and add Reply-To already now
285 285
             foreach ($federation->listFederationAdmins() as $fedadmin_id) {
@@ -294,19 +294,19 @@  discard block
 block discarded – undo
294 294
             }
295 295
         }
296 296
 
297
-        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_inst), 72) . "\n\n" .
298
-                $proto . $_SERVER['SERVER_NAME'] . CONFIG['PATHS']['cat_base_url'] . "admin/action_enrollment.php?token=$newtoken\n\n" .
299
-                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), CONFIG['APPEARANCE']['productname']), 72) . "\n\n" .
300
-                $proto . $_SERVER['SERVER_NAME'] . CONFIG['PATHS']['cat_base_url'] . "admin/\n\n" .
301
-                _("and enter the invitation token") . "\n\n" .
302
-                $newtoken . "\n\n$replyToMessage\n\n" .
303
-                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72) . "\n\n" .
304
-                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), CONFIG['APPEARANCE']['productname']), 72) . "\n\n" .
297
+        $message .= wordwrap(sprintf(_("To enlist as an administrator for that %s, please click on the following link:"), Entity::$nomenclature_inst), 72)."\n\n".
298
+                $proto.$_SERVER['SERVER_NAME'].CONFIG['PATHS']['cat_base_url']."admin/action_enrollment.php?token=$newtoken\n\n".
299
+                wordwrap(sprintf(_("If clicking the link doesn't work, you can also go to the %s Administrator Interface at"), CONFIG['APPEARANCE']['productname']), 72)."\n\n".
300
+                $proto.$_SERVER['SERVER_NAME'].CONFIG['PATHS']['cat_base_url']."admin/\n\n".
301
+                _("and enter the invitation token")."\n\n".
302
+                $newtoken."\n\n$replyToMessage\n\n".
303
+                wordwrap(_("Do NOT forward the mail before the token has expired - or the recipients may be able to consume the token on your behalf!"), 72)."\n\n".
304
+                wordwrap(sprintf(_("We wish you a lot of fun with the %s."), CONFIG['APPEARANCE']['productname']), 72)."\n\n".
305 305
                 sprintf(_("Sincerely,\n\nYour friendly folks from %s Operations"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
306 306
 
307 307
 
308 308
 // who to whom?
309
-        $mail->FromName = CONFIG['APPEARANCE']['productname'] . " Invitation System";
309
+        $mail->FromName = CONFIG['APPEARANCE']['productname']." Invitation System";
310 310
 
311 311
         if (isset(CONFIG['APPEARANCE']['invitation-bcc-mail']) && CONFIG['APPEARANCE']['invitation-bcc-mail'] !== NULL) {
312 312
             $mail->addBCC(CONFIG['APPEARANCE']['invitation-bcc-mail']);
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
         $loggerInstance = new Logging();
357 357
         $ch = \curl_init($url);
358 358
         if ($ch === FALSE) {
359
-            $loggerInstance->debug(2,"Unable to POST JSON request: CURL init failed!");
359
+            $loggerInstance->debug(2, "Unable to POST JSON request: CURL init failed!");
360 360
             return json_decode(json_encode(FALSE), TRUE);
361 361
         }
362 362
         \curl_setopt_array($ch, array(
Please login to merge, or discard this patch.
web/lib/admin/UIElements.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $find = array_keys($displayNames, $input, TRUE);
129 129
 
130 130
         if (count($find) == 0) { // this is an error! throw an Exception
131
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
131
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
132 132
         }
133 133
         \core\common\Entity::outOfThePotatoes();
134 134
         return $find[0];
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
         foreach ($optionlist as $option) {
151 151
             $type = $optioninfo->optionType($option['name']);
152
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
152
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
153 153
                 // all non-multilang attribs get this assignment ...
154 154
                 $language = "";
155 155
                 $content = $option['value'];
@@ -167,19 +167,19 @@  discard block
 block discarded – undo
167 167
                         $locationMarkers[] = $coords;
168 168
                         break;
169 169
                     case "file":
170
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
170
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
171 171
                         switch ($option['name']) {
172 172
                             case "general:logo_file":
173 173
                             case "fed:logo_file":
174
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
174
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row']);
175 175
                                 break;
176 176
                             case "eap:ca_file":
177 177
                             // fall-through intended: display both the same way
178 178
                             case "fed:minted_ca_file":
179
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
179
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row']);
180 180
                                 break;
181 181
                             case "support:info_file":
182
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row']);
182
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row']);
183 183
                                 break;
184 184
                             default:
185 185
                         }
@@ -189,10 +189,10 @@  discard block
 block discarded – undo
189 189
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
190 190
                             break;
191 191
                         }
192
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
192
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
193 193
                         break;
194 194
                     default:
195
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
195
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
196 196
                 }
197 197
             }
198 198
         }
@@ -201,11 +201,11 @@  discard block
 block discarded – undo
201 201
             $locationCount = 0;
202 202
             foreach ($locationMarkers as $g) {
203 203
                 $locationCount++;
204
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
204
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
205 205
             }
206 206
             $marker .= '<\/markers>'; // some validator says this should be escaped
207 207
             $jMarker = json_encode($locationMarkers);
208
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
208
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
209 209
         }
210 210
         \core\common\Entity::outOfThePotatoes();
211 211
         return $retval;
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
         \core\common\Entity::intoThePotatoes();
222 222
         $idpoptions = $myInst->getAttributes();
223 223
         $retval = "<div class='infobox'>
224
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst) . "</h2>
224
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureInst)."</h2>
225 225
         <table>
226 226
             <tr>
227 227
                 <td>
228
-                    " . _("Country:") . "
228
+                    " . _("Country:")."
229 229
                 </td>
230 230
                 <td>
231 231
                 </td>
@@ -235,16 +235,16 @@  discard block
 block discarded – undo
235 235
         $retval .= $myFed->name;
236 236
         $retval .= "</strong>
237 237
                 </td>
238
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
238
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
239 239
         </table>
240 240
     </div>";
241 241
 
242 242
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
243 243
         foreach ($blocks as $block) {
244 244
             $retval .= "<div class='infobox'>
245
-            <h2>" . $block[1] . "</h2>
245
+            <h2>" . $block[1]."</h2>
246 246
             <table>" .
247
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
247
+                    $this->infoblock($idpoptions, $block[0], "IdP").
248 248
                     "</table>
249 249
         </div>";
250 250
         }
@@ -259,12 +259,12 @@  discard block
 block discarded – undo
259 259
      */
260 260
     private function displaySize(int $number) {
261 261
         if ($number > 1024 * 1024) {
262
-            return round($number / 1024 / 1024, 2) . " MiB";
262
+            return round($number / 1024 / 1024, 2)." MiB";
263 263
         }
264 264
         if ($number > 1024) {
265
-            return round($number / 1024, 2) . " KiB";
265
+            return round($number / 1024, 2)." KiB";
266 266
         }
267
-        return $number . " B";
267
+        return $number." B";
268 268
     }
269 269
 
270 270
     /**
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
         $this->checkROWIDpresence($cAReference);
337 337
         $rawResult = UIElements::getBlobFromDB($cAReference, FALSE);
338 338
         if (is_bool($rawResult)) { // we didn't actually get a CA!
339
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
339
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
340 340
             \core\common\Entity::outOfThePotatoes();
341 341
             return $retval;
342 342
         }
@@ -352,13 +352,13 @@  discard block
 block discarded – undo
352 352
 
353 353
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
354 354
         $details['name'] = preg_replace('/\//', "", $details['name']);
355
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
355
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
356 356
         if ($details['ca'] == 0 && $details['root'] != 1) {
357
-            $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>";
357
+            $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>";
358 358
             \core\common\Entity::outOfThePotatoes();
359 359
             return $retval;
360 360
         }
361
-        $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 style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $details['name'] . "</div>";
361
+        $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 style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$details['name']."</div>";
362 362
         \core\common\Entity::outOfThePotatoes();
363 363
         return $retval;
364 364
     }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
     public function previewImageinHTML($imageReference) {
373 373
         \core\common\Entity::intoThePotatoes();
374 374
         $this->checkROWIDpresence($imageReference);
375
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
375
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
376 376
         \core\common\Entity::outOfThePotatoes();
377 377
         return $retval;
378 378
     }
@@ -388,13 +388,13 @@  discard block
 block discarded – undo
388 388
         $this->checkROWIDpresence($fileReference);
389 389
         $fileBlob = UIElements::getBlobFromDB($fileReference, FALSE);
390 390
         if (is_bool($fileBlob)) { // we didn't actually get a file!
391
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
391
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
392 392
             \core\common\Entity::outOfThePotatoes();
393 393
             return $retval;
394 394
         }
395 395
         $decodedFileBlob = base64_decode($fileBlob);
396 396
         $fileinfo = new \finfo();
397
-        $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>";
397
+        $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>";
398 398
         \core\common\Entity::outOfThePotatoes();
399 399
         return $retval;
400 400
     }
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
             $retval .= "<tr><td>";
423 423
         }
424 424
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
425
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
425
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
426 426
         if (!$omittabletags) {
427 427
             $retval .= "</td><td>";
428 428
         }
@@ -502,8 +502,8 @@  discard block
 block discarded – undo
502 502
             return "";
503 503
         }
504 504
 
505
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
506
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
505
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
506
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
507 507
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
508 508
             return "";
509 509
         }
@@ -518,8 +518,8 @@  discard block
 block discarded – undo
518 518
         $scale = sqrt($maxoccupy / $totallogopixels);
519 519
         $loggerInstance->debug(4, "Scaling info: $scale, $maxoccupy, $totallogopixels\n");
520 520
         // determine final pixel size - round to multitude of $symbolsize to match exact symbol boundary
521
-        $targetwidth = (int)($symbolsize * round($sizelogo[0] * $scale / $symbolsize));
522
-        $targetheight = (int)($symbolsize * round($sizelogo[1] * $scale / $symbolsize));
521
+        $targetwidth = (int) ($symbolsize * round($sizelogo[0] * $scale / $symbolsize));
522
+        $targetheight = (int) ($symbolsize * round($sizelogo[1] * $scale / $symbolsize));
523 523
         // paint white below the logo, in case it has transparencies (looks bad)
524 524
         // have one symbol in each direction extra white space
525 525
         $whiteimage = imagecreate($targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
@@ -528,8 +528,8 @@  discard block
 block discarded – undo
528 528
         }
529 529
         imagecolorallocate($whiteimage, 255, 255, 255);
530 530
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
531
-        $targetplacementx = (int)($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize));
532
-        $targetplacementy = (int)($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize));
531
+        $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize) / 2) / $symbolsize));
532
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize) / 2) / $symbolsize));
533 533
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
534 534
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
535 535
         ob_start();
Please login to merge, or discard this patch.
web/diag/magicTelepath.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  *          <base_url>/copyright.php after deploying the software
20 20
  */
21 21
 
22
-require_once dirname(dirname(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 $realm = filter_input(INPUT_GET, 'realm', FILTER_SANITIZE_STRING);
24
-$visited = filter_input(INPUT_GET,'visited', FILTER_SANITIZE_STRING);
25
-$nro = filter_input(INPUT_GET,'nro', FILTER_SANITIZE_STRING);
24
+$visited = filter_input(INPUT_GET, 'visited', FILTER_SANITIZE_STRING);
25
+$nro = filter_input(INPUT_GET, 'nro', FILTER_SANITIZE_STRING);
26 26
 CAT_session_start();
27 27
 $languageObject = new core\common\Language();
28 28
 $languageObject->setTextDomain("diagonstics");
Please login to merge, or discard this patch.
web/diag/diag.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@
 block discarded – undo
42 42
     $auth->authenticate();
43 43
 }
44 44
 if (isset($_SESSION['admin_diag_auth'])) {
45
-   $admin =  1;
46
-   unset($_SESSION['admin_diag_auth']);
45
+    $admin =  1;
46
+    unset($_SESSION['admin_diag_auth']);
47 47
 }
48 48
 $Gui = new \web\lib\user\Gui();
49 49
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? CONFIG['APPEARANCE']['skins'][0]);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
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
 $admin = filter_input(INPUT_GET, 'admin', FILTER_VALIDATE_INT);
24 24
 $auth = new \web\lib\admin\Authentication();
25 25
 $isauth = 0;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             unset($q_el[$idx]);
34 34
             $q_r = preg_replace("/\?.*/", "", $_SERVER['REQUEST_URI']);
35 35
             if (count($q_el)) {
36
-                $q_r = $q_r . '?' . implode('&', $q_el);
36
+                $q_r = $q_r.'?'.implode('&', $q_el);
37 37
             }
38 38
             $_SERVER['REQUEST_URI'] = $q_r;
39 39
         }
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
     $auth->authenticate();
43 43
 }
44 44
 if (isset($_SESSION['admin_diag_auth'])) {
45
-   $admin =  1;
45
+   $admin = 1;
46 46
    unset($_SESSION['admin_diag_auth']);
47 47
 }
48 48
 $Gui = new \web\lib\user\Gui();
49 49
 $skinObject = new \web\lib\user\Skinjob($_REQUEST['skin'] ?? $_SESSION['skin'] ?? $fedskin[0] ?? CONFIG['APPEARANCE']['skins'][0]);
50
-require "../skins/" . $skinObject->skin . "/diag/diag.php";
50
+require "../skins/".$skinObject->skin."/diag/diag.php";
51 51
 
52 52
 
Please login to merge, or discard this patch.
web/skins/modern/diag/diag.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
                         echo "0\">";
157 157
                         echo _("This service is for authenticated admins only.") . '<br>';
158 158
                         echo "<a href=\"diag.php?admin=1\">" .
159
-                             _("eduroam® admin access is needed") . "</a>";
159
+                                _("eduroam® admin access is needed") . "</a>";
160 160
                     }
161 161
                 ?>
162 162
             </div> 
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 
41 41
 <?php
42 42
 $profile_list_size = 1;
43
-require_once dirname(__DIR__) . '/Divs.php';
43
+require_once dirname(__DIR__).'/Divs.php';
44 44
 $divs = new Divs($Gui);
45 45
 $visibility = 'index';
46 46
 $operatingSystem = $Gui->detectOS();
47 47
 $Gui->loggerInstance->debug(4, $operatingSystem);
48 48
 $uiElements = new web\lib\admin\UIElements();
49 49
 if ($operatingSystem) {
50
-    print "recognisedOS = '" . $operatingSystem['device'] . "';\n";
50
+    print "recognisedOS = '".$operatingSystem['device']."';\n";
51 51
 }
52
-require dirname(__DIR__) . '/user/js/cat_js.php';
52
+require dirname(__DIR__).'/user/js/cat_js.php';
53 53
 ?>
54 54
 
55 55
 </script>
@@ -81,9 +81,9 @@  discard block
 block discarded – undo
81 81
             <?php echo $divs->divPagetitle(_("Diagnostics site"), ""); ?>
82 82
             <div id="user_info" style='padding-top: 10px;'>
83 83
             <div id='diagnostic_choice'>
84
-                <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?>
85
-                <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?>   
86
-                <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?>
84
+                <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?>
85
+                <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?>   
86
+                <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?>
87 87
             </div>
88 88
             <div id='diagnostic_enduser' style='display: none;'>
89 89
                 <h2><?php echo _("Tools for End Users"); ?></h2>
@@ -93,24 +93,24 @@  discard block
 block discarded – undo
93 93
                 ?>
94 94
                 </p>
95 95
                 <?php
96
-                    echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>';
96
+                    echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>';
97 97
                     echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<b>realm.tld</b>):");
98 98
                 ?>
99 99
                 <input type='text' name='user_realm' id='user_realm' value=''>
100 100
                 <?php
101
-                    echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>';
102
-                    echo _("You can select your home institution from the following list") . '<br/>';
101
+                    echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>';
102
+                    echo _("You can select your home institution from the following list").'<br/>';
103 103
                     echo '<div id="select_idp_country"><a href="" id="idp_countries_list">';    
104
-                    echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>';
104
+                    echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>';
105 105
                 ?>
106 106
                 <div id="select_idp_area" style="display:none;">
107 107
                 </div>
108 108
                 </div>
109 109
                 <div id="position_info">
110 110
                     <?php
111
-                        echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>';
111
+                        echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>';
112 112
                         echo '<div id="select_sp_country"><a href="" id="sp_countries_list">';    
113
-                        echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>';
113
+                        echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>';
114 114
                     ?>
115 115
                     <div id="select_sp_area" style="display:none;">
116 116
                     </div>
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
                             echo 'none';
144 144
                         }
145 145
                         echo ";'>";
146
-                        echo '<h3>' . _("Which problem are you reporting?") . '</h3>';
146
+                        echo '<h3>'._("Which problem are you reporting?").'</h3>';
147 147
                         echo '<input type="radio" name="problem_type" value="1">';
148
-                        echo _("SP contacting IdP due to technical problems or abuse") . '<br>';
148
+                        echo _("SP contacting IdP due to technical problems or abuse").'<br>';
149 149
                         echo '<input type="radio" name="problem_type" value="2">';
150 150
                         echo _("IdP contacting SP due to technical problems");
151 151
                         echo "<div id='idp_contact_area'></div>";
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
                         echo "</div>"; 
155 155
                     } else {
156 156
                         echo "0\">";
157
-                        echo _("This service is for authenticated admins only.") . '<br>';
158
-                        echo "<a href=\"diag.php?admin=1\">" .
159
-                             _("eduroam® admin access is needed") . "</a>";
157
+                        echo _("This service is for authenticated admins only.").'<br>';
158
+                        echo "<a href=\"diag.php?admin=1\">".
159
+                             _("eduroam® admin access is needed")."</a>";
160 160
                     }
161 161
                 ?>
162 162
             </div> 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         if (type === 'idp' || type === 'sp') {
181 181
             shtml = '<table><tbody><tr id="row_'+type+'_country"></tr>';
182 182
             shtml = shtml + '<tr id="row_'+type+'_institution" style="visibility: collapse;">';
183
-            shtml = shtml + '<td>' + <?php echo '"' . _("Select institiution:") . '"'; ?> + '</td><td></td></tr>';
183
+            shtml = shtml + '<td>' + <?php echo '"'._("Select institiution:").'"'; ?> + '</td><td></td></tr>';
184 184
             if (type === 'idp') {
185 185
                 shtml = shtml + '<tr id="row_idp_realm"></tr>';
186 186
             }
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         var options = '';
207 207
         var selecthead = '';
208 208
         if (type1 === 'sp' || type1 === 'idp') {
209
-            selecthead = <?php echo '"<td>' . _("Select country or region:") . ' </td>"'; ?>;
209
+            selecthead = <?php echo '"<td>'._("Select country or region:").' </td>"'; ?>;
210 210
             selecthead = selecthead + '<td>\n';
211 211
         }
212 212
         var select = '<select id="' + type1 + '_country" name="' + type1 + '_country" style="margin-left:0px; width:400px;">';
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             options = ($('#'+type2+'_country').html());
215 215
             countryAddSelect(selecthead, select + options + '</select>', type1);
216 216
         } else {
217
-            var comment = <?php echo '"<br><br>' . _("Fetching country/region list") . '..."'; ?>;
217
+            var comment = <?php echo '"<br><br>'._("Fetching country/region list").'..."'; ?>;
218 218
             inProgress(1, comment);
219 219
             $.ajax({
220 220
                 url: "findRealm.php",
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         return false;
249 249
     }
250 250
     function testSociopath(realm, answer) {
251
-        var comment = <?php echo '"' . _("Testing realm") . '..."'; ?>; 
251
+        var comment = <?php echo '"'._("Testing realm").'..."'; ?>; 
252 252
         inProgress(1, comment);
253 253
         if ($('#tested_realm').length == 0) {
254 254
             $('<input>').attr({
@@ -272,9 +272,9 @@  discard block
 block discarded – undo
272 272
                                 query = '<input type="hidden" id="tested_realm" value="' + realm + '">';
273 273
                             }    
274 274
                             query = query + '<div id="current_query">'+data['TEXT']+'</div>';
275
-                            query = query + '<div><button id="answer_yes">' + <?php echo '"' . _("Yes") . '"'; ?> + '</button>';
276
-                            query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"' . _("No") . '"'; ?> + '</button>';
277
-                            query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"' . _("I don't know") . '"'; ?> + '</button></div>';
275
+                            query = query + '<div><button id="answer_yes">' + <?php echo '"'._("Yes").'"'; ?> + '</button>';
276
+                            query = query + '<button style="margin-left:20px;" id="answer_no">' + <?php echo '"'._("No").'"'; ?> + '</button>';
277
+                            query = query + '<button style="margin-left:20px;" id="answer_noidea">' + <?php echo '"'._("I don't know").'"'; ?> + '</button></div>';
278 278
                             $('#sociopath_queries').html(query);
279 279
                             $('#sociopath_query_area').show();
280 280
                         }
@@ -305,55 +305,55 @@  discard block
 block discarded – undo
305 305
        }); 
306 306
     }
307 307
     function finalVerdict(realm, verdict) {
308
-        var title = <?php echo '"' . _("Diagnostic tests results for selected realm") . '"'; ?>;
308
+        var title = <?php echo '"'._("Diagnostic tests results for selected realm").'"'; ?>;
309 309
         result = '<div class="padding">';
310 310
         result = result + '<div><h3>';
311
-        result = result + <?php echo '"' . _("The result for tested realm:") . ' "'; ?> + realm;
311
+        result = result + <?php echo '"'._("The result for tested realm:").' "'; ?> + realm;
312 312
         result = result + '</h3></p><div style="padding: 5px;"><div style="padding: 0px;">';
313
-        result = result + <?php echo '"' . _("The system identified") . '" '; ?>  + ' ';
313
+        result = result + <?php echo '"'._("The system identified").'" '; ?>  + ' ';
314 314
         result = result + Object.keys(verdict).length + ' ';
315
-        result = result + <?php echo '"' . _("suspected areas which potentially can cause a problem.") . '"'; ?> + '<br>';
316
-        result = result + <?php echo '"' . _("Next to the problem description we show a speculated probability of this event.") . '"'; ?>;
315
+        result = result + <?php echo '"'._("suspected areas which potentially can cause a problem.").'"'; ?> + '<br>';
316
+        result = result + <?php echo '"'._("Next to the problem description we show a speculated probability of this event.").'"'; ?>;
317 317
         result = result + '</div><div style="padding: 5px;"><table>';
318 318
         k = 1;
319 319
         for (key in verdict) {
320 320
             result = result + '<tr><td>' + k + '.</td>';
321 321
             k = k + 1;
322 322
             if (key === 'INFRA_DEVICE') {
323
-                result = result + '<td>' + <?php echo '"' . _("Your device configuration is broken") . '"'; ?> + '</td>';
323
+                result = result + '<td>' + <?php echo '"'._("Your device configuration is broken").'"'; ?> + '</td>';
324 324
             }
325 325
             if (key === 'INFRA_SP_80211') {
326
-                result = result + '<td>' + <?php echo '"' . _("The Wi-Fi network in your vicinity has quality issues") . '"'; ?> + '</td>';
326
+                result = result + '<td>' + <?php echo '"'._("The Wi-Fi network in your vicinity has quality issues").'"'; ?> + '</td>';
327 327
             }
328 328
             if (key === 'INFRA_SP_LAN') {
329
-                result = result + '<td>' + <?php echo '"' . _("The network environment around you is broken") . '"'; ?> + '</td>';
329
+                result = result + '<td>' + <?php echo '"'._("The network environment around you is broken").'"'; ?> + '</td>';
330 330
             }
331 331
             if (key === 'INFRA_SP_RADIUS') {
332
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your service provider is the source of the problem") . '"'; ?> + '</td>';
332
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your service provider is the source of the problem").'"'; ?> + '</td>';
333 333
             }
334 334
             if (key === 'INFRA_IDP_AUTHBACKEND') {
335
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server in your home institution is currently unable to authenticate you") . '"'; ?> + '</td>';
335
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server in your home institution is currently unable to authenticate you").'"'; ?> + '</td>';
336 336
             }
337 337
             if (key === 'INFRA_NRO_SP') {
338
-                result = result + '<td>' + <?php echo '"' . _("The national server in the country/region you are visiting is not functioning correctly") . '"'; ?> + '</td>';
338
+                result = result + '<td>' + <?php echo '"'._("The national server in the country/region you are visiting is not functioning correctly").'"'; ?> + '</td>';
339 339
             }
340 340
             if (key === 'INFRA_LINK_ETLR_NRO_SP') {
341
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of the country/region you are visiting and the top-level server is broken") . '"'; ?> + '</td>';
341
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of the country/region you are visiting and the top-level server is broken").'"'; ?> + '</td>';
342 342
             }
343 343
             if (key === 'INFRA_LINK_ETLR_NRO_IdP') {
344
-                result = result + '<td>' + <?php echo '"' . _("The link between the national server of your home country/region and the top-level server is broken") . '"'; ?> + '</td>';
344
+                result = result + '<td>' + <?php echo '"'._("The link between the national server of your home country/region and the top-level server is broken").'"'; ?> + '</td>';
345 345
             }
346 346
             if (key === 'INFRA_ETLR') {
347
-                result = result + '<td>' + <?php echo '"' . _("The communication to the top-level server is down") . '"'; ?> + '</td>';
347
+                result = result + '<td>' + <?php echo '"'._("The communication to the top-level server is down").'"'; ?> + '</td>';
348 348
             }
349 349
             if (key === 'INFRA_NRO_IdP') {
350
-                result = result + '<td>' + <?php echo '"' . _("The national server in your home country/region is not functioning properly.") . '"'; ?> + '</td>';
350
+                result = result + '<td>' + <?php echo '"'._("The national server in your home country/region is not functioning properly.").'"'; ?> + '</td>';
351 351
             }
352 352
             if (key === 'INFRA_IdP_RADIUS') {
353
-                result = result + '<td>' + <?php echo '"' . _("The RADIUS server of your home institution is the source of the problem") . '"'; ?> + '</td>';
353
+                result = result + '<td>' + <?php echo '"'._("The RADIUS server of your home institution is the source of the problem").'"'; ?> + '</td>';
354 354
             }
355 355
             if (key === 'INFRA_NONEXISTENTREALM') {
356
-                result = result + '<td>' + <?php echo '"' . _("This realm does not exist") . '"'; ?> + '</td>';
356
+                result = result + '<td>' + <?php echo '"'._("This realm does not exist").'"'; ?> + '</td>';
357 357
             }
358 358
             result = result + '<td style="padding-left: 5px;">' + (verdict[key] * 100).toFixed(2) + "%</td></tr>";
359 359
         }
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
         return false;
466 466
     });
467 467
     $(document).on('change', '#idp_country' , function() {
468
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
468
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
469 469
         var id = $(this).attr('id');
470 470
         var k = id.indexOf('_');
471 471
         var type = id.substr(0,k);
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
                         var shtml = '';
484 484
                         var select = '';
485 485
                         if (type !== 'asp') {
486
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
486
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
487 487
                         }
488 488
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
489 489
                         for (var i in institutions) {
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
                     } else {
505 505
                         if (data.status === 0) {
506 506
                             inProgress(0);
507
-                            var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide realm you are interested in.") . '"'; ?>;
507
+                            var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide realm you are interested in.").'"'; ?>;
508 508
                             alert(msg);
509 509
                             $('#select_idp_country').show();
510 510
                             $('#select_idp_area').hide();
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
                 },
514 514
                 error:function() {
515 515
                     inProgress(0);
516
-                    var msg = <?php echo '"' . _("Can not search database. You have to provide realm you are interested in.") . '"'; ?>;
516
+                    var msg = <?php echo '"'._("Can not search database. You have to provide realm you are interested in.").'"'; ?>;
517 517
                     alert(msg);
518 518
                     $('#select_idp_country').show();
519 519
                     $('#select_idp_area').hide();
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
         return false;
529 529
     });
530 530
     $(document).on('change', '#sp_country, #asp_country' , function() {
531
-        var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>;  
531
+        var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>;  
532 532
         var id = $(this).attr('id');
533 533
         var k = id.indexOf('_');
534 534
         var type = id.substr(0,k);
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
                         var shtml = '';
547 547
                         var select = '';
548 548
                         if (type !== 'asp') {
549
-                            shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>;
549
+                            shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>;
550 550
                         }
551 551
                         select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>';
552 552
                         for (var i in hotspots) {
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
                             inProgress(0);
570 570
                             var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">';
571 571
                             var shtml = '<td></td><td>';
572
-                            select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>';
572
+                            select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>';
573 573
                             if (type !== 'asp') {
574 574
                                 $('#row_' + type + '_institution').html('');
575 575
                                 $('#row_' + type + '_institution').append(shtml + select);
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
             $('#start_test_area').hide();
604 604
             return false;
605 605
         }
606
-        var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>;
606
+        var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>;
607 607
         inProgress(1, comment);
608 608
         $.ajax({
609 609
             url: "findRealm.php",
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
                     var realms = data.realms;
616 616
                     var realmselect = '';
617 617
                     if (realms.length > 1) {
618
-                        realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>;
618
+                        realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>;
619 619
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
620 620
                         for (var i in realms) {
621 621
                             realmselect = realmselect + '<input type="radio" name="realm" ';
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
                         }
628 628
                         realmselect = realmselect + '</span></td>';
629 629
                     } else {
630
-                        realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>;
630
+                        realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>;
631 631
                         realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>";
632 632
                         realmselect = realmselect + realms[0] + '</span>';
633 633
                         realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">';
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
             });
683 683
             t = 1;
684 684
         }
685
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
685
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
686 686
         inProgress(1, comment);
687 687
         /*waiting(comment);*/
688 688
         $.ajax({
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
                             }
727 727
                         });
728 728
                         $('#sp_questions > tbody').append('<tr class="error_row"><td>' +
729
-                                <?php echo '"' . _("Realm is not registered with the eduroam database:") . '"'; ?> +
729
+                                <?php echo '"'._("Realm is not registered with the eduroam database:").'"'; ?> +
730 730
                                 '</td><td>' + realm + '</td></tr>');
731 731
                         $('#admin_realm').val('');
732 732
                     }    
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
         testSociopath('', answer);
751 751
     });
752 752
     $('#realmtest').click(function(event){
753
-        var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>;
753
+        var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>;
754 754
         inProgress(1, comment);
755 755
         $('#start_test_area').hide();
756 756
         if ($('#select_sp_area').is(':hidden')) {
@@ -798,13 +798,13 @@  discard block
 block discarded – undo
798 798
                         reset_footer();
799 799
                         testSociopath(realm, 0);
800 800
                     } else {
801
-                        var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>;
802
-                        result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occured") . '"'; ?>;
801
+                        var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>;
802
+                        result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occured").'"'; ?>;
803 803
                         result = result + '</h3>'
804 804
                         if (r.length == 1) {
805
-                            result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>;
805
+                            result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>;
806 806
                         } else {    
807
-                            result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>;
807
+                            result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>;
808 808
                         }
809 809
                         result = result + ': '
810 810
                         for (var i=0; i < r.length; i++) {
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
                             result = result + r[i];
815 815
                         }
816 816
                         result = result + '.<br>';
817
-                        result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
817
+                        result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>';
818 818
                         result = result + '</div>';
819 819
                         $('#after_stage_1').hide();
820 820
                         $('#before_stage_1').show();
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
                 });
875 875
             });
876 876
         });
877
-        var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>;
877
+        var comment = <?php echo '"'._("Running realm tests").'..."'; ?>;
878 878
         inProgress(1, comment);
879 879
         $.ajax({
880 880
             url: "findRealm.php",
@@ -945,29 +945,29 @@  discard block
 block discarded – undo
945 945
             success:function(data) {
946 946
                 if (data.status === 1) {
947 947
                     var result = '';
948
-                    var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>;
948
+                    var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>;
949 949
                     result = '<div class="padding">';
950 950
                     if (type == 'idp_send') {
951
-                        result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>';
951
+                        result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>';
952 952
                         result = result + '<table>';
953
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
954
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
955
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email(s)") . '"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>';
956
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
957
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
958
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
953
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
954
+                        result = result + '<tr><td>' + <?php echo '"'._("SP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
955
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email(s)").'"'; ?> + '</td><td>' + data.idpcontact + '</td></tr>';
956
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
957
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
958
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
959 959
                     }
960 960
                     if (type == 'sp_send') {
961
-                        result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>';
961
+                        result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>';
962 962
                         result = result + '<table>';
963
-                        result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>';
964
-                        result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>';
965
-                        result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
966
-                        result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>';
967
-                        result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
968
-                        result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>';
969
-                        result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
970
-                        result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
963
+                        result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>';
964
+                        result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>';
965
+                        result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>';
966
+                        result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>';
967
+                        result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>';
968
+                        result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>';
969
+                        result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>';
970
+                        result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>';
971 971
                     }
972 972
                     result = result + '</div>';
973 973
                     showInfo(result, title);
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
         if ($('#mac').val().length > 0) {
985 985
             if ($('#mac').val().length != 17) {
986 986
                 $('#mac').addClass('error_input');
987
-                $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>);
987
+                $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>);
988 988
             } else {
989 989
                 $('#mac').removeClass('error_input'); 
990 990
                 $('#mac').attr('title', '');
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
         if ($(this).attr('id') == 'email' &&  $(this).val().length > 0) {
994 994
             if (!isEmail($(this).val())) {
995 995
                 $('#email').addClass('error_input');
996
-                $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>);
996
+                $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>);
997 997
             } else {
998 998
                 $('#email').removeClass('error_input');
999 999
                 $('#email').attr('title', '');
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
         if ($(this).attr('id') == 'outer_id' &&  $(this).val().length > 0) {
1003 1003
             if (!isEmail($(this).val(), true)) {
1004 1004
                 $('#outer_id').addClass('error_input');
1005
-                $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>);
1005
+                $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>);
1006 1006
             } else {
1007 1007
                 $('#outer_id').removeClass('error_input');
1008 1008
                 $('#outer_id').attr('title', '');
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
         if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) {
1012 1012
             if (!isOperatorName($(this).val())) {
1013 1013
                 $('#opname').addClass('error_input');
1014
-                $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>);
1014
+                $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>);
1015 1015
                 $('#spmanually').show();
1016 1016
             } else {
1017 1017
                 $('#opname').removeClass('error_input');
Please login to merge, or discard this patch.
web/lib/user/TextTemplates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 const DOWNLOAD_REDIRECT_CONTINUE = 1054;
50 50
 const SB_GO_AWAY = 1060;
51 51
 const SB_FRONTPAGE_BIGDOWNLOADBUTTON = 1061;
52
-const SB_FRONTPAGE_ROLLER_CUSTOMBUILT= 1062;
52
+const SB_FRONTPAGE_ROLLER_CUSTOMBUILT = 1062;
53 53
 
54 54
 
55 55
 /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->templates[WELCOME_ABOARD_BACKTODOWNLOADS] = _("Back to downloads");
89 89
         $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']);
90 90
         $this->templates[HEADING_TOPLEVEL_GREET] = sprintf(_("Welcome to %s"), CONFIG['APPEARANCE']['productname']);
91
-        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"),CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
91
+        $this->templates[HEADING_TOPLEVEL_PURPOSE] = sprintf(_("Connect your device to %s"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
92 92
         $this->templates[FRONTPAGE_ROLLER_EASY] = sprintf(_("%s installation made easy:"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
93 93
         $this->templates[FRONTPAGE_ROLLER_CUSTOMBUILT] = _("Custom built for your organisation");
94 94
         $this->templates[FRONTPAGE_BIGDOWNLOADBUTTON] = sprintf(_("Click here to download your %s installer"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']);
Please login to merge, or discard this patch.
core/EntityWithDBProperties.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             case "core\User":
127 127
                 return $this->userName;
128 128
             default:
129
-                throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - " . get_class($this) . "!");
129
+                throw new Exception("Operating on a class where we don't know the relevant identifier in the DB - ".get_class($this)."!");
130 130
         }
131 131
     }
132 132
 
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @return array list of row id's of file-based attributes which weren't deleted
163 163
      */
164 164
     public function beginFlushAttributes($extracondition = "") {
165
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
165
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
166 166
         $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND option_name NOT LIKE '%_file' $extracondition");
167 167
         $this->updateFreshness();
168 168
         $execFlush = $this->databaseHandle->exec("SELECT row FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier $extracondition");
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
      * @return void
182 182
      */
183 183
     public function commitFlushAttributes(array $tobedeleted) {
184
-        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "") . $this->getRelevantIdentifier() . (!is_int($this->getRelevantIdentifier()) ? "\"" : "");
184
+        $quotedIdentifier = (!is_int($this->getRelevantIdentifier()) ? "\"" : "").$this->getRelevantIdentifier().(!is_int($this->getRelevantIdentifier()) ? "\"" : "");
185 185
         foreach (array_keys($tobedeleted) as $row) {
186 186
             $this->databaseHandle->exec("DELETE FROM $this->entityOptionTable WHERE $this->entityIdColumn = $quotedIdentifier AND row = $row");
187 187
             $this->updateFreshness();
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
     public function addAttribute($attrName, $attrLang, $attrValue) {
209 209
         $relevantId = $this->getRelevantIdentifier();
210 210
         $identifierType = (is_int($relevantId) ? "i" : "s");
211
-        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType . "sss", $relevantId, $attrName, $attrLang, $attrValue);
211
+        $this->databaseHandle->exec("INSERT INTO $this->entityOptionTable ($this->entityIdColumn, option_name, option_lang, option_value) VALUES(?,?,?,?)", $identifierType."sss", $relevantId, $attrName, $attrLang, $attrValue);
212 212
         $this->updateFreshness();
213 213
     }
214 214
 
Please login to merge, or discard this patch.
core/CAT.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 namespace core;
34 34
 
35
-require_once dirname(__DIR__) . "/config/_config.php";
35
+require_once dirname(__DIR__)."/config/_config.php";
36 36
 
37 37
 CAT_session_start();
38 38
 
@@ -105,19 +105,19 @@  discard block
 block discarded – undo
105 105
         parent::__construct();
106 106
         common\Entity::intoThePotatoes();
107 107
         
108
-        $this->CAT_VERSION_STRING = sprintf(_("Unreleased %s Git Revision"),"<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>";
108
+        $this->CAT_VERSION_STRING = sprintf(_("Unreleased %s Git Revision"), "<a href='https://github.com/GEANT/CAT/tree/master/Changes.md'>")."</a>";
109 109
         if (CAT::RELEASE_VERSION) {
110
-            $temp_version = "CAT-" . CAT::VERSION_MAJOR . "." . CAT::VERSION_MINOR;
111
-            $branch = "release_" . CAT::VERSION_MAJOR . "_" . CAT::VERSION_MINOR;
110
+            $temp_version = "CAT-".CAT::VERSION_MAJOR.".".CAT::VERSION_MINOR;
111
+            $branch = "release_".CAT::VERSION_MAJOR."_".CAT::VERSION_MINOR;
112 112
             if (CAT::VERSION_PATCH != 0) {
113
-                $temp_version .= "." . CAT::VERSION_PATCH;
113
+                $temp_version .= ".".CAT::VERSION_PATCH;
114 114
             }
115 115
             if (CAT::VERSION_EXTRA != "") {
116
-                $temp_version .= "-" . CAT::VERSION_EXTRA;
116
+                $temp_version .= "-".CAT::VERSION_EXTRA;
117 117
             }
118
-            $this->CAT_VERSION_STRING = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/" . $branch . "/Changes.md", $temp_version);
118
+            $this->CAT_VERSION_STRING = sprintf(_("Release <a href='%s'>%s</a>"), "https://github.com/GEANT/CAT/tree/".$branch."/Changes.md", $temp_version);
119 119
         }
120
-        $this->CAT_COPYRIGHT = CONFIG['APPEARANCE']['productname'] . " - " . $this->CAT_VERSION_STRING . " &copy; " . CAT::COPYRIGHT_MIN_YEAR . "-" . CAT::COPYRIGHT_MAX_YEAR . " " . CAT::COPYRIGHT_HOLDER . "<br/>on behalf of " . CAT::COPYRIGHT_CONSORTIA . "; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
120
+        $this->CAT_COPYRIGHT = CONFIG['APPEARANCE']['productname']." - ".$this->CAT_VERSION_STRING." &copy; ".CAT::COPYRIGHT_MIN_YEAR."-".CAT::COPYRIGHT_MAX_YEAR." ".CAT::COPYRIGHT_HOLDER."<br/>on behalf of ".CAT::COPYRIGHT_CONSORTIA."; and others <a href='copyright.php'>Full Copyright and Licenses</a>";
121 121
         
122 122
 
123 123
         /* Federations are created in DB with bootstrapFederation, and listed via listFederations
Please login to merge, or discard this patch.
web/skins/modern/Divs.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
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'] : '&nbsp') . "</div>";
56
+        $retval .= "<div id='motd'>".(isset(CONFIG['APPEARANCE']['MOTD']) ? CONFIG['APPEARANCE']['MOTD'] : '&nbsp')."</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
 block discarded – undo
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,11 +87,11 @@  discard block
 block discarded – undo
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] . "
90
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_USAGE]."
91
+    <p>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_PROBLEMS]."
92 92
     </p>
93 93
     <p>
94
-    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS] . "</strong></a>
94
+    <a href='javascript:back_to_downloads()'><strong>" . $this->Gui->textTemplates->templates[user\WELCOME_ABOARD_BACKTODOWNLOADS]."</strong></a>
95 95
     </p>
96 96
 </div> <!-- id='user_welcomer_page' -->
97 97
 ";
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function divSilverbullet() {
102 102
         $retval = "
103 103
 <div id='silverbullet'>"
104
-                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY] .
104
+                . $this->Gui->textTemplates->templates[user\SB_GO_AWAY].
105 105
                 "</div>
106 106
     ";
107 107
         return $retval;
@@ -114,10 +114,10 @@  discard block
 block discarded – undo
114 114
         }
115 115
         return "
116 116
 <div id='welcome_top1'>
117
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET] . "
117
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_GREET]."
118 118
 </div>
119 119
 <div id='top_invite'>
120
-    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE] . $retval . "
120
+    " . $this->Gui->textTemplates->templates[user\HEADING_TOPLEVEL_PURPOSE].$retval."
121 121
 </div>";
122 122
     }
123 123
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $retval = "
126 126
 <div id='roller'>
127 127
     <div id='slides'>
128
-        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY] . "</span>
128
+        <span id='line1'>" . $this->Gui->textTemplates->templates[user\FRONTPAGE_ROLLER_EASY]."</span>
129 129
         <span id='line2'></span>
130 130
         <span id='line3'></span>
131 131
         <span id='line4'>";
@@ -177,9 +177,9 @@  discard block
 block discarded – undo
177 177
     public function divProfiles() {
178 178
         return "
179 179
 <div id='profiles'> <!-- this is the profile selection filled during run time -->
180
-    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION] . "
180
+    <div id='profiles_h' class='sub_h'>" . $this->Gui->textTemplates->templates[user\PROFILE_SELECTION]."
181 181
     </div>" .
182
-                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>" .
182
+                "<select id='profile_list'></select><div id='profile_desc' class='profile_desc'></div>".
183 183
                 "</div>";
184 184
     }
185 185
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     public function divInstitution($selectButton = TRUE) {
194 194
         $retval = "<div id='institution_name'>
195 195
     <span id='inst_name_span'></span> <div id='inst_extra_text'></div><!-- this will be filled with the IdP name -->" .
196
-                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">" . $this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION] . "</a>" : "") .
196
+                ($selectButton ? "<a  id='select_another' class='signin' href=\"\">".$this->Gui->textTemplates->templates[user\INSTITUTION_SELECTION]."</a>" : "").
197 197
                 "</div>";
198 198
         $retval .= $this->emptyImage('idp_logo', 'IdP Logo');
199 199
         return $retval;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
     public function divOtherinstallers() {
208 208
         $retval = "
209 209
 <div class='sub_h'>
210
-    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "
210
+    <div id='other_installers'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."
211 211
          <table id='device_list' style='padding:0px;'>";
212 212
 
213 213
         foreach ($this->Gui->listDevices(isset($_REQUEST['hidden']) ? $_REQUEST['hidden'] : 0) as $group => $deviceGroup) {
@@ -215,18 +215,18 @@  discard block
 block discarded – undo
215 215
             $deviceIndex = 0;
216 216
 
217 217
             $imgTag = "";
218
-            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $group . ".png");
218
+            $imgLocation = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$group.".png");
219 219
             if ($imgLocation !== FALSE) {
220
-                $imgTag = '<img src="' . $imgLocation . '" alt="' . $group . ' Device" title="' . $group . ' Device">';
220
+                $imgTag = '<img src="'.$imgLocation.'" alt="'.$group.' Device" title="'.$group.' Device">';
221 221
             }
222
-            $retval .= '<tbody><tr><td class="vendor" rowspan="' . $groupIndex . '">' . $imgTag . '</td>';
222
+            $retval .= '<tbody><tr><td class="vendor" rowspan="'.$groupIndex.'">'.$imgTag.'</td>';
223 223
             foreach ($deviceGroup as $d => $D) {
224 224
                 if ($deviceIndex) {
225 225
                     $retval .= '<tr>';
226 226
                 }
227
-                $retval .= "<td><button id='" . $d . "'>" . $D['display'] . "</button>"
228
-                        . "<div class='device_info' id='info_" . $d . "'></div></td>"
229
-                        . "<td><button class='more_info_b' id='info_b_" . $d . "'>i</button></td></tr>\n";
227
+                $retval .= "<td><button id='".$d."'>".$D['display']."</button>"
228
+                        . "<div class='device_info' id='info_".$d."'></div></td>"
229
+                        . "<td><button class='more_info_b' id='info_b_".$d."'>i</button></td></tr>\n";
230 230
                 $deviceIndex++;
231 231
             }
232 232
             $retval .= "</tbody>";
@@ -240,15 +240,15 @@  discard block
 block discarded – undo
240 240
     }
241 241
 
242 242
     public function divGuessOs($operatingSystem) {
243
-        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/" . $operatingSystem['group'] . ".png");
243
+        $vendorlogo = $this->Gui->skinObject->findResourceUrl("IMAGES", "vendorlogo/".$operatingSystem['group'].".png");
244 244
         $vendorstyle = "";
245 245
         if ($vendorlogo !== FALSE) {
246
-            $vendorstyle = "style='background-image:url(\"" . $vendorlogo . "\")'";
246
+            $vendorstyle = "style='background-image:url(\"".$vendorlogo."\")'";
247 247
         }
248 248
         $deleteIcon = $this->Gui->skinObject->findResourceUrl("IMAGES", "icons/delete_32.png");
249 249
         $deleteImg = "";
250 250
         if ($deleteIcon !== FALSE) {
251
-            $deleteImg = "<img id='cross_icon_" . $operatingSystem['device'] . "' src='$deleteIcon' >";
251
+            $deleteImg = "<img id='cross_icon_".$operatingSystem['device']."' src='$deleteIcon' >";
252 252
         }
253 253
         return "
254 254
 <div class='sub_h' id='guess_os'>
@@ -256,23 +256,23 @@  discard block
 block discarded – undo
256 256
     <table id='browser'>
257 257
         <tr>
258 258
             <td>
259
-                <button class='large_button guess_os' $vendorstyle id='g_" . $operatingSystem['device'] . "'>
259
+                <button class='large_button guess_os' $vendorstyle id='g_".$operatingSystem['device']."'>
260 260
                     $deleteImg
261
-                    <div class='download_button_text_1' id='download_button_header_" . $operatingSystem['device'] . "'> " . $this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE] . "
261
+                    <div class='download_button_text_1' id='download_button_header_".$operatingSystem['device']."'> ".$this->Gui->textTemplates->templates[user\DOWNLOAD_MESSAGE]."
262 262
                     </div>
263 263
                     <div class='download_button_text'>" .
264
-                $operatingSystem['display'] . "
264
+                $operatingSystem['display']."
265 265
                     </div>
266 266
                 </button>
267
-                <div class='device_info' id='info_g_" . $operatingSystem['device'] . "'></div>
267
+                <div class='device_info' id='info_g_" . $operatingSystem['device']."'></div>
268 268
           </td>
269 269
           <td style='vertical-align:top'>
270
-               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device'] . "'>i</button>
270
+               <button class='more_info_b large_button' id='g_info_b_" . $operatingSystem['device']."'>i</button>
271 271
           </td>
272 272
       </tr>
273 273
     </table> <!-- id='browser' -->
274 274
     <div class='sub_h'>
275
-       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE] . "</a>
275
+       <a href='javascript:other_installers()'>" . $this->Gui->textTemplates->templates[user\DOWNLOAD_CHOOSE]."</a>
276 276
     </div>
277 277
 </div> <!-- id='guess_os' -->";
278 278
     }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
             </td>";
289 289
 
290 290
         if (!empty(CONFIG['APPEARANCE']['privacy_notice_url'])) {
291
-            $retval .= "<td><a href='" . CONFIG['APPEARANCE']['privacy_notice_url'] . "'>" . sprintf(_("%s Privacy Notice"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</a></td>";
291
+            $retval .= "<td><a href='".CONFIG['APPEARANCE']['privacy_notice_url']."'>".sprintf(_("%s Privacy Notice"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</a></td>";
292 292
         }
293 293
         $retval .= "<td>";
294 294
         if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == "eduroam" && isset(CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo']) && CONFIG_CONFASSISTANT['CONSORTIUM']['deployment-voodoo'] == "Operations Team") {
Please login to merge, or discard this patch.