Passed
Push — release_2_1 ( 53e78a...79034c )
by Tomasz
09:38
created
web/lib/admin/UIElements.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             sprintf(_("%s: Do not terminate EAP"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-noterm",
136 136
             sprintf(_("%s: max users per profile"), \core\ProfileSilverbullet::PRODUCTNAME) => "fed:silverbullet-maxusers",
137 137
             sprintf(_("Mint %s with CA on creation"), $this->nomenclatureIdP) => "fed:minted_ca_file",
138
-            sprintf(_("OpenRoaming: Allow %s Opt-In"),$this->nomenclatureParticipant) => "fed:openroaming",
138
+            sprintf(_("OpenRoaming: Allow %s Opt-In"), $this->nomenclatureParticipant) => "fed:openroaming",
139 139
             _("OpenRoaming: Custom NAPTR Target") => "fed:openroaming_customtarget",
140 140
             $ssidText => "media:SSID",
141 141
             $passpointOiText => "media:consortium_OI",
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         $find = array_keys($displayNames, $input, TRUE);
148 148
 
149 149
         if (count($find) == 0) { // this is an error! throw an Exception
150
-            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: " . htmlentities($input));
150
+            throw new \Exception("The translation of an option name was requested, but the option is not known to the system: ".htmlentities($input));
151 151
         }
152 152
         \core\common\Entity::outOfThePotatoes();
153 153
         // none of the strings have HTML in them, only translators can provide own text for it -> no threat, but complained about by the security review
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
         foreach ($optionlist as $option) {
171 171
             $type = $optioninfo->optionType($option['name']);
172
-            if (preg_match('/^' . $class . '/', $option['name']) && $option['level'] == "$level") {
172
+            if (preg_match('/^'.$class.'/', $option['name']) && $option['level'] == "$level") {
173 173
                 // all non-multilang attribs get this assignment ...
174 174
                 $language = "";
175 175
                 $content = $option['value'];
@@ -187,19 +187,19 @@  discard block
 block discarded – undo
187 187
                         $locationMarkers[] = $coords;
188 188
                         break;
189 189
                     case "file":
190
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td>";
190
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td>";
191 191
                         switch ($option['name']) {
192 192
                             case "general:logo_file":
193 193
                             case "fed:logo_file":
194
-                                $retval .= $this->previewImageinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
194
+                                $retval .= $this->previewImageinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
195 195
                                 break;
196 196
                             case "eap:ca_file":
197 197
                             // fall-through intended: display both the same way
198 198
                             case "fed:minted_ca_file":
199
-                                $retval .= $this->previewCAinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
199
+                                $retval .= $this->previewCAinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
200 200
                                 break;
201 201
                             case "support:info_file":
202
-                                $retval .= $this->previewInfoFileinHTML('ROWID-' . $option['level'] . '-' . $option['row_id']);
202
+                                $retval .= $this->previewInfoFileinHTML('ROWID-'.$option['level'].'-'.$option['row_id']);
203 203
                                 break;
204 204
                             default:
205 205
                         }
@@ -209,10 +209,10 @@  discard block
 block discarded – undo
209 209
                             // do not display the option at all; it gets auto-set by the ProfileSilverbullet constructor and doesn't have to be seen
210 210
                             break;
211 211
                         }
212
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>";
212
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>".($content == "on" ? _("on") : _("off"))."</strong></td></tr>";
213 213
                         break;
214 214
                     default:
215
-                        $retval .= "<tr><td>" . $this->displayName($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>";
215
+                        $retval .= "<tr><td>".$this->displayName($option['name'])."</td><td>$language</td><td><strong>$content</strong></td></tr>";
216 216
                 }
217 217
             }
218 218
         }
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
             $locationCount = 0;
222 222
             foreach ($locationMarkers as $g) {
223 223
                 $locationCount++;
224
-                $marker .= '<marker name="' . $locationCount . '" lat="' . $g['lat'] . '" lng="' . $g['lon'] . '" />';
224
+                $marker .= '<marker name="'.$locationCount.'" lat="'.$g['lat'].'" lng="'.$g['lon'].'" />';
225 225
             }
226 226
             $marker .= '<\/markers>'; // some validator says this should be escaped
227 227
             $jMarker = json_encode($locationMarkers);
228
-            $retval .= '<tr><td><script>markers=\'' . $marker . '\'; jmarkers = \'' . $jMarker . '\';</script></td><td></td><td></td></tr>';
228
+            $retval .= '<tr><td><script>markers=\''.$marker.'\'; jmarkers = \''.$jMarker.'\';</script></td><td></td><td></td></tr>';
229 229
         }
230 230
         \core\common\Entity::outOfThePotatoes();
231 231
         return $retval;
@@ -241,11 +241,11 @@  discard block
 block discarded – undo
241 241
         \core\common\Entity::intoThePotatoes();
242 242
         $idpoptions = $myInst->getAttributes();
243 243
         $retval = "<div class='infobox'>
244
-        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant) . "</h2>
244
+        <h2>" . sprintf(_("General %s details"), $this->nomenclatureParticipant)."</h2>
245 245
         <table>
246 246
             <tr>
247 247
                 <td>
248
-                    " . _("Country:") . "
248
+                    " . _("Country:")."
249 249
                 </td>
250 250
                 <td>
251 251
                 </td>
@@ -255,16 +255,16 @@  discard block
 block discarded – undo
255 255
         $retval .= $myFed->name;
256 256
         $retval .= "</strong>
257 257
                 </td>
258
-            </tr>" . $this->infoblock($idpoptions, "general", "IdP") . "
258
+            </tr>" . $this->infoblock($idpoptions, "general", "IdP")."
259 259
         </table>
260 260
     </div>";
261 261
 
262 262
         $blocks = [["support", _("Global Helpdesk Details")], ["media", _("Media Properties")]];
263 263
         foreach ($blocks as $block) {
264 264
             $retval .= "<div class='infobox'>
265
-            <h2>" . $block[1] . "</h2>
265
+            <h2>" . $block[1]."</h2>
266 266
             <table>" .
267
-                    $this->infoblock($idpoptions, $block[0], "IdP") .
267
+                    $this->infoblock($idpoptions, $block[0], "IdP").
268 268
                     "</table>
269 269
         </div>";
270 270
         }
@@ -279,12 +279,12 @@  discard block
 block discarded – undo
279 279
      */
280 280
     private function displaySize(int $number) {
281 281
         if ($number > 1024 * 1024) {
282
-            return round($number / 1024 / 1024, 2) . " MiB";
282
+            return round($number / 1024 / 1024, 2)." MiB";
283 283
         }
284 284
         if ($number > 1024) {
285
-            return round($number / 1024, 2) . " KiB";
285
+            return round($number / 1024, 2)." KiB";
286 286
         }
287
-        return $number . " B";
287
+        return $number." B";
288 288
     }
289 289
 
290 290
     /**
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $caExpiryTrashhold = \config\ConfAssistant::CERT_WARNINGS['expiry_warning'];
340 340
         $rawResult = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
341 341
         if (is_bool($rawResult)) { // we didn't actually get a CA!
342
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the certificate from the database!") . "</div>";
342
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the certificate from the database!")."</div>";
343 343
             \core\common\Entity::outOfThePotatoes();
344 344
             return $retval;
345 345
         }
@@ -355,8 +355,8 @@  discard block
 block discarded – undo
355 355
 
356 356
         $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']);
357 357
         $details['name'] = preg_replace('/\//', "", $details['name']);
358
-        $certstatus = ( $details['root'] == 1 ? "R" : "I");
359
-        $certTooltip = ( $details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
358
+        $certstatus = ($details['root'] == 1 ? "R" : "I");
359
+        $certTooltip = ($details['root'] == 1 ? _("Root CA") : _("Intermediate CA"));
360 360
         $innerbgColor = "#0000ff";
361 361
         $leftBorderColor = "#00ff00";
362 362
         $message = "";
@@ -364,35 +364,35 @@  discard block
 block discarded – undo
364 364
             $leftBorderColor = "red";
365 365
             $message = _("This is a <strong>SERVER</strong> certificate!");
366 366
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
367
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
367
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
368 368
             }
369 369
             $message .= "<br/>";
370
-            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . $message . $details['name'] . "</div>";
370
+            $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>".$message.$details['name']."</div>";
371 371
             \core\common\Entity::outOfThePotatoes();
372 372
             return $retval;
373 373
         }
374 374
         $now = time();
375 375
         if ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_critical'] > $details['full_details']['validTo_time_t']) {
376 376
             $leftBorderColor = "red";
377
-            $message = _("Certificate expired!") . "<br>";
378
-        } elseif($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warnings']  > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
377
+            $message = _("Certificate expired!")."<br>";
378
+        } elseif ($now + \config\ConfAssistant::CERT_WARNINGS['expiry_warnings'] > $details['full_details']['validTo_time_t'] - $caExpiryTrashhold) {
379 379
             if ($leftBorderColor == "#00ff00") {
380 380
                 $leftBorderColor = "yellow";
381 381
             }
382
-            $message = _("Certificate close to expiry!") . "<br/>";            
382
+            $message = _("Certificate close to expiry!")."<br/>";            
383 383
         }
384 384
    
385 385
         if ($details['root'] == 1 && $details['basicconstraints_set'] == 0) {
386 386
             if ($leftBorderColor == "#00ff00") {
387 387
                 $leftBorderColor = "yellow";
388 388
             }
389
-            $message .= "<div style='max-width: 25em'><strong>" . _("Improper root certificate, required critical CA extension missing, will not reliably install!") . "</strong>";
389
+            $message .= "<div style='max-width: 25em'><strong>"._("Improper root certificate, required critical CA extension missing, will not reliably install!")."</strong>";
390 390
             if (\config\ConfAssistant::CERT_GUIDELINES !== '') {
391
-                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>". _("more info")."</a>";
391
+                $message .= "<br/><a target='_blank' href='".\config\ConfAssistant::CERT_GUIDELINES."'>"._("more info")."</a>";
392 392
             }
393 393
             $message .= "</div><br/>";
394 394
         }
395
-        $retval =  "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>" . $message . $details['name'] . "<br>" . $this->displayName('eap:ca_vailduntil') . " " . gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t']) . " UTC</div>";
395
+        $retval = "<div class='ca-summary' style='border-left-color: $leftBorderColor'><div style='position:absolute; right: -15px; width:20px; height:20px; background-color:$innerbgColor; border-radius:10px; text-align: center;'><div title='$certTooltip' style='padding-top:3px; font-weight:bold; color:#ffffff;'>$certstatus</div></div>".$message.$details['name']."<br>".$this->displayName('eap:ca_vailduntil')." ".gmdate('Y-m-d H:i:s', $details['full_details']['validTo_time_t'])." UTC</div>";
396 396
         \core\common\Entity::outOfThePotatoes();
397 397
         return $retval;
398 398
     }
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
      */
406 406
     public function previewImageinHTML($imageReference) {
407 407
         \core\common\Entity::intoThePotatoes();
408
-        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=" . $imageReference . "' alt='" . _("Preview of logo file") . "'/>";
408
+        $retval = "<img style='max-width:150px' src='inc/filepreview.php?id=".$imageReference."' alt='"._("Preview of logo file")."'/>";
409 409
         \core\common\Entity::outOfThePotatoes();
410 410
         return $retval;
411 411
     }
@@ -422,13 +422,13 @@  discard block
 block discarded – undo
422 422
         $ref = $validator->databaseReference($fileReference);
423 423
         $fileBlob = UIElements::getBlobFromDB($ref['table'], $ref['rowindex'], FALSE);
424 424
         if (is_bool($fileBlob)) { // we didn't actually get a file!
425
-            $retval = "<div class='ca-summary'>" . _("There was an error while retrieving the file from the database!") . "</div>";
425
+            $retval = "<div class='ca-summary'>"._("There was an error while retrieving the file from the database!")."</div>";
426 426
             \core\common\Entity::outOfThePotatoes();
427 427
             return $retval;
428 428
         }
429 429
         $decodedFileBlob = base64_decode($fileBlob);
430 430
         $fileinfo = new \finfo();
431
-        $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>";
431
+        $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>";
432 432
         \core\common\Entity::outOfThePotatoes();
433 433
         return $retval;
434 434
     }
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
459 459
             $retval .= "<tr><td>";
460 460
         }
461 461
         $finalCaption = ($caption !== NULL ? $caption : $uiMessages[$level]['text']);
462
-        $retval .= "<img class='icon' src='" . $uiMessages[$level]['icon'] . "' alt='" . $finalCaption . "' title='" . $finalCaption . "'/>";
462
+        $retval .= "<img class='icon' src='".$uiMessages[$level]['icon']."' alt='".$finalCaption."' title='".$finalCaption."'/>";
463 463
         if (!$omittabletags) {
464 464
             $retval .= "</td><td>";
465 465
         }
@@ -577,8 +577,8 @@  discard block
 block discarded – undo
577 577
             return "";
578 578
         }
579 579
 
580
-        $loggerInstance->debug(4, "Consortium logo is at: " . ROOT . "/web/resources/images/consortium_logo_large.png");
581
-        $logogd = imagecreatefrompng(ROOT . "/web/resources/images/consortium_logo_large.png");
580
+        $loggerInstance->debug(4, "Consortium logo is at: ".ROOT."/web/resources/images/consortium_logo_large.png");
581
+        $logogd = imagecreatefrompng(ROOT."/web/resources/images/consortium_logo_large.png");
582 582
         if ($logogd === FALSE) { // consortium logo is bogus; don't do anything
583 583
             return "";
584 584
         }
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
         imagecolorallocate($whiteimage, 255, 255, 255);
605 605
         // also make sure the initial placement is a multitude of 12; otherwise "two half" symbols might be affected
606 606
         $targetplacementx = (int) ($symbolsize * round(($sizeinput[0] / 2 - ($targetwidth - $symbolsize + 1) / 2) / $symbolsize));
607
-        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1 ) / 2) / $symbolsize));
607
+        $targetplacementy = (int) ($symbolsize * round(($sizeinput[1] / 2 - ($targetheight - $symbolsize + 1) / 2) / $symbolsize));
608 608
         imagecopyresized($inputgd, $whiteimage, $targetplacementx - $symbolsize, $targetplacementy - $symbolsize, 0, 0, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize, $targetwidth + 2 * $symbolsize, $targetheight + 2 * $symbolsize);
609 609
         imagecopyresized($inputgd, $logogd, $targetplacementx, $targetplacementy, 0, 0, $targetwidth, $targetheight, $sizelogo[0], $sizelogo[1]);
610 610
         ob_start();
@@ -654,9 +654,9 @@  discard block
 block discarded – undo
654 654
                 $message = "Your configuration appears to be fine.";
655 655
                 break;
656 656
             default:
657
-                throw new Exception("The result code level " . $test->test_result['global'] . " is not defined!");
657
+                throw new Exception("The result code level ".$test->test_result['global']." is not defined!");
658 658
         }
659
-        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>" . $message . "<br>See below for details<br><hr>");
659
+        $out .= $this->boxFlexible($test->test_result['global'], "<br><strong>Test Summary</strong><br>".$message."<br>See below for details<br><hr>");
660 660
         foreach ($test->out as $testValue) {
661 661
             foreach ($testValue as $o) {
662 662
                 $out .= $this->boxFlexible($o['level'], $o['message']);
Please login to merge, or discard this patch.
web/user/about_cat.inc.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -42,24 +42,24 @@
 block discarded – undo
42 42
         \config\ConfAssistant::CONSORTIUM['display_name'], 
43 43
         \config\Master::APPEARANCE['productname'], 
44 44
         \config\Master::APPEARANCE['productname']);
45
-$out .= "<p>" . sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname']) . "</p>";
46
-$out .= "<table><tr><th>" . _("Device Group") . "</th><th>" . _("Device") . "</th>";
45
+$out .= "<p>".sprintf(_("<span class='edu_cat'>%s</span> currently supports the following devices and EAP type combinations:"), \config\Master::APPEARANCE['productname'])."</p>";
46
+$out .= "<table><tr><th>"._("Device Group")."</th><th>"._("Device")."</th>";
47 47
 foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) {
48
-    $out .= "<th style='min-width: 80px;'>" . $oneeap->getPrintableRep() . "</th>";
48
+    $out .= "<th style='min-width: 80px;'>".$oneeap->getPrintableRep()."</th>";
49 49
 }
50 50
 $out .= "</tr>";
51 51
 foreach (\devices\Devices::listDevices() as $index => $onedevice) {
52 52
     if (isset($onedevice['options'])) {
53
-        if ((isset($onedevice['options']['hidden']) && ( $onedevice['options']['hidden'] == 1 || $onedevice['options']['hidden'] == 2 ))|| (isset($onedevice['options']['redirect']) && ($onedevice['options']['redirect'] == 1))) {
53
+        if ((isset($onedevice['options']['hidden']) && ($onedevice['options']['hidden'] == 1 || $onedevice['options']['hidden'] == 2)) || (isset($onedevice['options']['redirect']) && ($onedevice['options']['redirect'] == 1))) {
54 54
             continue;
55 55
         }
56 56
     }
57
-    $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/" . $onedevice['group'] . ".png");
57
+    $vendor = (new \web\lib\user\Skinjob())->findResourceUrl("IMAGES", "vendorlogo/".$onedevice['group'].".png");
58 58
     $vendorImg = "";
59 59
     if ($vendor !== FALSE) {
60 60
         $vendorImg = "<img src='$vendor' alt='logo'>";
61 61
     }
62
-    $out .= "<tr><td class='vendor'>$vendorImg</td><td>" . $onedevice['display'] . "</td>";
62
+    $out .= "<tr><td class='vendor'>$vendorImg</td><td>".$onedevice['display']."</td>";
63 63
     $device_instance = new \core\DeviceFactory($index);
64 64
     foreach (\core\common\EAP::listKnownEAPTypes() as $oneeap) {
65 65
         $out .= "<td>";
Please login to merge, or discard this patch.
web/admin/edit_profile_result.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         echo $deco->pageheader(sprintf(_("%s: Edit Profile - Result"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
54 54
     } else {
55 55
         $profile = $my_inst->newProfile(core\AbstractProfile::PROFILETYPE_RADIUS);
56
-        $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ". $my_inst->identifier." - Profile created");
56
+        $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$my_inst->identifier." - Profile created");
57 57
         echo $deco->pageheader(sprintf(_("%s: Profile wizard (step 3 completed)"), \config\Master::APPEARANCE['productname']), "ADMIN-IDP");
58 58
     }
59 59
     if (!$profile instanceof \core\ProfileRADIUS) {
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
     $realm = FALSE;
64 64
     $anon_support = FALSE;
65 65
     $attributes = $profile->getAttributes();
66
-    $anonLocal =  \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ??  "anonymous";
66
+    $anonLocal = \core\common\Entity::getAttributeValue($attributes, "internal:anon_local_value", 0) ?? "anonymous";
67 67
     $checkuser_support = FALSE;
68
-    $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ??  "anonymous";
68
+    $checkuser_local = \core\common\Entity::getAttributeValue($attributes, "internal:checkuser_value", 0) ?? "anonymous";
69 69
     $verify_support = FALSE;
70 70
     $hint_support = FALSE;
71 71
     $redirect = FALSE;
Please login to merge, or discard this patch.
web/diag/action_realmcheck.php 1 patch
Spacing   +76 added lines, -76 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(__DIR__)) . "/config/_config.php";
22
+require_once dirname(dirname(__DIR__))."/config/_config.php";
23 23
 
24 24
 $loggerInstance = new \core\common\Logging();
25 25
 
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
             $dnsChecksOR = new \core\diag\RFC7585Tests($check_realm, "aaa+auth:radius.tls.tcp");
70 70
         }
71 71
     } else {
72
-        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!") . "</p>";
72
+        $error_message = _("You asked for a realm check, but we don't know the realm for this profile!")."</p>";
73 73
     }
74 74
 } else { // someone else's realm, and we don't know anything about it... only shallow checks
75 75
     $check_realm = $validator->realm($realm ?? $_SESSION['check_realm'] ?? "");
76 76
     if ($check_realm !== FALSE) {
77 77
         $_SESSION['check_realm'] = $check_realm;
78
-        $testsuite = new \core\diag\RADIUSTests($check_realm, "@" . $check_realm);
78
+        $testsuite = new \core\diag\RADIUSTests($check_realm, "@".$check_realm);
79 79
         $dnsChecks = new \core\diag\RFC7585Tests($check_realm);
80 80
     } else {
81 81
         $error_message = _("No valid realm name given, cannot execute any checks!");
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     var listofcas = "<?php echo _("You should update your list of accredited CAs") ?>";
127 127
     var getitfrom = "<?php echo _("Get it from here.") ?>";
128 128
     var listsource = "<?php echo \config\Diagnostics::RADIUSTESTS['accreditedCAsURL'] ?>";
129
-    var moretext = "<?php echo _("more") . "&raquo;" ?>";
129
+    var moretext = "<?php echo _("more")."&raquo;" ?>";
130 130
     var lesstext = "<?php echo "&laquo" ?>";
131 131
     var morealltext = "<?php echo _("Show detailed information for all tests") ?>";
132 132
     var unknownca_code = "<?php echo \core\diag\RADIUSTests::CERTPROB_UNKNOWN_CA ?>";
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                         }
274 274
                     }
275 275
                     cliinfo = cliinfo + '<li><table><tbody><tr><td class="icon_td"><img class="icon" src="' + icons[level] + '" style="width: 24px;"></td><td>' + state;
276
-                    cliinfo = cliinfo + ' <?php echo "(" . sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;") . ")"; ?>' + add + '</td></tr>';
276
+                    cliinfo = cliinfo + ' <?php echo "(".sprintf(_("elapsed time: %sms."), "'+data.ca[key].certificate[c].time_millisec+'&nbsp;").")"; ?>' + add + '</td></tr>';
277 277
                     cliinfo = cliinfo + '</tbody></table></ul></li>';
278 278
                     if (data.ca[key].certificate[c].finalerror === 1) {
279 279
                         cliinfo = cliinfo + '<li>' + restskipped + '</li>';
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
                 });
469 469
             }
470 470
             o = o + cert_data + '</table>';
471
-            $("#eap_test" + data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="' + icons[v.level] + '"><span style="position: relative; top: -5px; <?php echo $start;?>: 1em">' + v.eap + ' &ndash; <?php printf(_("elapsed time: %sms."), "'+v.time_millisec+'&nbsp;") ?></span></strong><div class="more" style="padding-<?php echo $start;?>: 40px"><div class="morecontent"><div style="display:none; background: #eee;">' + o + '</div><a href="" class="morelink">' + moretext + '</a></div></div>');
471
+            $("#eap_test" + data.hostindex).append('<strong><img style="position: relative; top: 2px;" src="' + icons[v.level] + '"><span style="position: relative; top: -5px; <?php echo $start; ?>: 1em">' + v.eap + ' &ndash; <?php printf(_("elapsed time: %sms."), "'+v.time_millisec+'&nbsp;") ?></span></strong><div class="more" style="padding-<?php echo $start; ?>: 40px"><div class="morecontent"><div style="display:none; background: #eee;">' + o + '</div><a href="" class="morelink">' + moretext + '</a></div></div>');
472 472
         });
473 473
     }
474 474
 
@@ -479,8 +479,8 @@  discard block
 block discarded – undo
479 479
 <?php
480 480
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
481 481
     print "
482
-$(\"#live_src" . $hostindex . "_img\").attr('src',icon_loading);
483
-$(\"#live_src" . $hostindex . "_img\").show();
482
+$(\"#live_src" . $hostindex."_img\").attr('src',icon_loading);
483
+$(\"#live_src" . $hostindex."_img\").show();
484 484
 $.ajax({
485 485
     url: 'radius_tests.php?src=0&hostindex=$hostindex&realm='+realm,
486 486
     type: 'POST',
@@ -511,16 +511,16 @@  discard block
 block discarded – undo
511 511
 <?php
512 512
 foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
513 513
     if ($testedProfile !== NULL) {
514
-        $extraarg = "profile_id: " . $testedProfile->identifier . ", ";
514
+        $extraarg = "profile_id: ".$testedProfile->identifier.", ";
515 515
     } else {
516 516
         $extraarg = "";
517 517
     }
518 518
     print "
519
-$(\"#src" . $hostindex . "_img\").attr('src',icon_loading);
519
+$(\"#src" . $hostindex."_img\").attr('src',icon_loading);
520 520
 $(\"#src$hostindex\").html('');
521 521
 running_ajax_stat++;
522
-//$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'  }, udp, 'json');
523
-$.ajax({url:'radius_tests.php', timeout: 5000,  data:{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex'}, error: eee, success: udp, dataType: 'json'}); 
522
+//$.get('radius_tests.php',{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'  }, udp, 'json');
523
+$.ajax({url:'radius_tests.php', timeout: 5000,  data:{test_type: 'udp', $extraarg realm: realm, src: $hostindex, lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex'}, error: eee, success: udp, dataType: 'json'}); 
524 524
 ";
525 525
 }
526 526
 ?>
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
     if ($check_realm === FALSE) {
549 549
         print "<p>$error_message</p>";
550 550
     } else {
551
-        print "<h1>" . sprintf(_("Realm testing for: %s"), $check_realm) . "</h1>\n";
551
+        print "<h1>".sprintf(_("Realm testing for: %s"), $check_realm)."</h1>\n";
552 552
         ?>
553 553
         <div id="debug_out" style="display: none"></div>
554 554
         <div id="tabs" style="min-width: 600px; max-width:1000px">
@@ -570,25 +570,25 @@  discard block
 block discarded – undo
570 570
                     // NAPTR existence check
571 571
                     if ($dynType == "") {
572 572
                         $rfc7585suite = $dnsChecks;
573
-                        echo "<strong>" . _("DNS checks") . "</strong><div>";
573
+                        echo "<strong>"._("DNS checks")."</strong><div>";
574 574
                     } else {
575 575
                         if (count($orrealm) == 0) {
576 576
                             continue;
577 577
                         }
578 578
                         $rfc7585suite = $dnsChecksOR;
579
-                        echo "<strong>" . _("OpenRoaming DNS checks") . "</strong><div>";
579
+                        echo "<strong>"._("OpenRoaming DNS checks")."</strong><div>";
580 580
                     }
581 581
                     $naptr = $rfc7585suite->relevantNAPTR();
582 582
                     if ($naptr == \core\diag\RADIUSTests::RETVAL_NOTCONFIGURED) {
583 583
                         if ($dynType == "") {
584
-                        	echo "<tr><td>" . _("Dynamic discovery test is not configured") . "</td><td>";
584
+                        	echo "<tr><td>"._("Dynamic discovery test is not configured")."</td><td>";
585 585
                         } else {
586
-                        	echo "<tr><td>" . _("OpenRoaming connectivity test is not configured") . "</td><td>";
586
+                        	echo "<tr><td>"._("OpenRoaming connectivity test is not configured")."</td><td>";
587 587
                         }
588 588
                     } else {
589 589
                         echo "<table>";
590 590
                         // output in friendly words
591
-                        echo "<tr><td>" . _("Checking NAPTR existence:") . "</td><td>";
591
+                        echo "<tr><td>"._("Checking NAPTR existence:")."</td><td>";
592 592
                         switch ($naptr) {
593 593
                             case \core\diag\RFC7585Tests::RETVAL_NONAPTR:
594 594
                                 echo _("This realm has no NAPTR records.");
@@ -603,7 +603,7 @@  discard block
 block discarded – undo
603 603
 
604 604
                         // compliance checks for NAPTRs
605 605
                         if ($naptr > 0) {
606
-                            echo "<tr><td>" . _("Checking NAPTR compliance (flag = S and regex = {empty}):") . "</td><td>";
606
+                            echo "<tr><td>"._("Checking NAPTR compliance (flag = S and regex = {empty}):")."</td><td>";
607 607
                             $naptr_valid = $rfc7585suite->relevantNAPTRcompliance();
608 608
                             switch ($naptr_valid) {
609 609
                                 case \core\diag\RADIUSTests::RETVAL_OK:
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
                         // SRV resolution
619 619
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK) {
620 620
                             $srv = $rfc7585suite->relevantNAPTRsrvResolution();
621
-                            echo "<tr><td>" . _("Checking SRVs:") . "</td><td>";
621
+                            echo "<tr><td>"._("Checking SRVs:")."</td><td>";
622 622
                             switch ($srv) {
623 623
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
624 624
                                     echo _("This check was skipped.");
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                         // IP addresses for the hosts
635 635
                         if ($naptr > 0 && $naptr_valid == \core\diag\RADIUSTests::RETVAL_OK && $srv > 0) {
636 636
                             $hosts = $rfc7585suite->relevantNAPTRhostnameResolution();
637
-                            echo "<tr><td>" . _("Checking IP address resolution:") . "</td><td>";
637
+                            echo "<tr><td>"._("Checking IP address resolution:")."</td><td>";
638 638
                             switch ($srv) {
639 639
                                 case \core\diag\RADIUSTests::RETVAL_SKIPPED:
640 640
                                     echo _("This check was skipped.");
@@ -651,12 +651,12 @@  discard block
 block discarded – undo
651 651
                         echo "</table><br/>";
652 652
                         if ($dynType == "") {
653 653
                             if (count($testsuite->listerrors()) == 0) {
654
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("with no DNS errors encountered. Congratulations!");
654
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("with no DNS errors encountered. Congratulations!");
655 655
                             } else {
656
-                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC"))) . _("but there were DNS errors! Check them!") . " " . _("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
656
+                                echo sprintf(_("Realm is <strong>%s</strong> "), _(($naptr > 0 ? "DYNAMIC" : "STATIC")))._("but there were DNS errors! Check them!")." "._("You should re-run the tests after fixing the errors; more errors might be uncovered at that point. The exact error causes are listed below.");
657 657
                                 echo "<div class='notacceptable'><table>";
658 658
                                 foreach ($testsuite->listerrors() as $details) {
659
-                                    echo "<tr><td>" . $details['TYPE'] . "</td><td>" . $details['TARGET'] . "</td></tr>";
659
+                                    echo "<tr><td>".$details['TYPE']."</td><td>".$details['TARGET']."</td></tr>";
660 660
                                 }
661 661
                                 echo "</table></div>";
662 662
                             }
@@ -675,13 +675,13 @@  discard block
 block discarded – undo
675 675
                  $("#dynamic_tests").show();
676 676
               ';
677 677
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
678
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
678
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
679 679
                             $expectedName = $addr['hostname'];
680 680
                             print "
681 681
                             running_ajax_dyn++;
682
-                            $.ajax({url:'radius_tests.php', timeout: 5000,  data:{test_type: 'capath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
682
+                            $.ajax({url:'radius_tests.php', timeout: 5000,  data:{test_type: 'capath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
683 683
                             running_ajax_dyn++;
684
-                            $.ajax({url:'radius_tests.php', timeout: 5000, data:{test_type: 'clients', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
684
+                            $.ajax({url:'radius_tests.php', timeout: 5000, data:{test_type: 'clients', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex' }, error: eee, success: clients, dataType: 'json'}); 
685 685
                        ";
686 686
                         }
687 687
                         echo "}
@@ -697,11 +697,11 @@  discard block
 block discarded – undo
697 697
                  $("#openroaming_tests").show();
698 698
               ';
699 699
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
700
-                            $host = ($addr['family'] == "IPv6" ? "[" : "") . $addr['IP'] . ($addr['family'] == "IPv6" ? "]" : "") . ":" . $addr['port'];
700
+                            $host = ($addr['family'] == "IPv6" ? "[" : "").$addr['IP'].($addr['family'] == "IPv6" ? "]" : "").":".$addr['port'];
701 701
                             $expectedName = $addr['hostname'];
702 702
                             print "
703 703
                             running_ajax_openroaming++;
704
-                            $.ajax({url:'radius_tests.php', timeout: 5000, data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '" . $gui->languageInstance->getLang() . "', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
704
+                            $.ajax({url:'radius_tests.php', timeout: 5000, data:{test_type: 'openroamingcapath', realm: realm, src: '$host', lang: '".$gui->languageInstance->getLang()."', hostindex: '$hostindex', expectedname: '$expectedName' }, error: eee, success: capath, dataType: 'json'}); 
705 705
                        ";
706 706
                         }
707 707
                         echo "}
@@ -714,18 +714,18 @@  discard block
 block discarded – undo
714 714
                          $naptrs[1] = $naptr;
715 715
                      }
716 716
                 }
717
-                    echo "<strong>" . _("Static connectivity tests") . "</strong>
717
+                    echo "<strong>"._("Static connectivity tests")."</strong>
718 718
          <table><tr>
719 719
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_static_ico' class='icon'></td><td id='main_static_result' style='display:none'>&nbsp;</td>
720 720
          </tr></table>";
721 721
                     if ($naptrs[0] > 0) {
722
-                        echo "<hr><strong>" . _("Dynamic connectivity tests") . "</strong>
722
+                        echo "<hr><strong>"._("Dynamic connectivity tests")."</strong>
723 723
          <table><tr>
724 724
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_dynamic_ico' class='icon'></td><td id='main_dynamic_result' style='display:none'>&nbsp;</td>
725 725
          </tr></table>";
726 726
                     }
727 727
                     if (count($orrealm) && ($naptrs[1] > 0)) {
728
-                      echo "<hr><strong>" . _("OpenRoaming connectivity tests") . "</strong>
728
+                      echo "<hr><strong>"._("OpenRoaming connectivity tests")."</strong>
729 729
          <table><tr>
730 730
          <td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='main_openroaming_ico' class='icon'></td><td id='main_openroaming_result' style='display:none'>&nbsp;</td>
731 731
          </tr></table>";
@@ -745,12 +745,12 @@  discard block
 block discarded – undo
745 745
                     print "<p>";
746 746
                     foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
747 747
                         print "<hr>";
748
-                        printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
748
+                        printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
749 749
                         print "<table id='results$hostindex'  style='width:100%' class='udp_results'>
750 750
 <tr>
751
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src" . $hostindex . "_img'></td>
751
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='src".$hostindex."_img'></td>
752 752
 <td id='src$hostindex' colspan=2>
753
-" . _("testing...") . "
753
+"._("testing...")."
754 754
 </td>
755 755
 </tr>
756 756
 </table>";
@@ -761,7 +761,7 @@  discard block
 block discarded – undo
761 761
 
762 762
             </div>
763 763
             <?php
764
-            for ($i=3; $i<5; $i++) {
764
+            for ($i = 3; $i < 5; $i++) {
765 765
                 if ($i == 3 && $naptrs[0] <= 0) {
766 766
                    continue;
767 767
                 }
@@ -776,15 +776,15 @@  discard block
 block discarded – undo
776 776
                     $rfc7585suite = $dnsChecksOR;
777 777
                 }
778 778
             ?>
779
-                <div id="tabs-<?php echo $i;?>">
780
-                    <button id="run_<?php if ($i==3) echo 'd'; else echo 'o';?>_tests"; onclick="run_<?php if ($i==3) echo 'dynamic'; else echo 'openroaming';?>()"><?php if ($i==3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests");?></button>
779
+                <div id="tabs-<?php echo $i; ?>">
780
+                    <button id="run_<?php if ($i == 3) echo 'd'; else echo 'o'; ?>_tests"; onclick="run_<?php if ($i == 3) echo 'dynamic'; else echo 'openroaming'; ?>()"><?php if ($i == 3) echo _("Repeat dynamic connectivity tests"); else echo _("Repeat OpenRoaming connectivity tests"); ?></button>
781 781
 
782 782
                 <?php
783 783
                     echo "<div id='";
784
-                    if ($i==3) { echo 'dynamic'; } else { echo 'openroaming'; }
784
+                    if ($i == 3) { echo 'dynamic'; } else { echo 'openroaming'; }
785 785
                     echo "_tests'><fieldset class='option_container'>
786 786
                 <legend><strong>";
787
-                    if ($i==3) {
787
+                    if ($i == 3) {
788 788
                      echo _("DYNAMIC connectivity tests");
789 789
                     } else {
790 790
                      echo _("OpenRoaming connectivity tests");
@@ -798,17 +798,17 @@  discard block
 block discarded – undo
798 798
                     }
799 799
                     $resultstoprint = [];
800 800
                     if (count($rfc7585suite->NAPTR_hostname_records) > 0) {
801
-                        $resultstoprint[] = '<div style="align:'.$end.'; display: none;" id="' . $prefix1 . '_result_fail">' . _("Some errors were found during the tests, see below") . '</div><div style="align:'.$end.'; display: none;" id="' . $prefix1 . '_result_pass">' . _("All tests passed, congratulations!") . '</div>';
802
-                        $resultstoprint[] = '<div style="align:'.$end.';"><a href="" class="moreall">' . _('Show detailed information for all tests') . '</a></div>' . '<p><strong>' . _("Checking server handshake...") . "</strong><p>";
801
+                        $resultstoprint[] = '<div style="align:'.$end.'; display: none;" id="'.$prefix1.'_result_fail">'._("Some errors were found during the tests, see below").'</div><div style="align:'.$end.'; display: none;" id="'.$prefix1.'_result_pass">'._("All tests passed, congratulations!").'</div>';
802
+                        $resultstoprint[] = '<div style="align:'.$end.';"><a href="" class="moreall">'._('Show detailed information for all tests').'</a></div>'.'<p><strong>'._("Checking server handshake...")."</strong><p>";
803 803
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
804
-                            $bracketaddr = ($addr["family"] == "IPv6" ? "[" . $addr["IP"] . "]" : $addr["IP"]);
805
-                            $resultstoprint[] = '<p><strong>' . $bracketaddr . ' TCP/' . $addr['port'] . '</strong>';
804
+                            $bracketaddr = ($addr["family"] == "IPv6" ? "[".$addr["IP"]."]" : $addr["IP"]);
805
+                            $resultstoprint[] = '<p><strong>'.$bracketaddr.' TCP/'.$addr['port'].'</strong>';
806 806
                             $resultstoprint[] = '<ul style="list-style-type: none;" class="caresult"><li>';
807
-                            $resultstoprint[] = "<table id='" . $prefix2 . "caresults$hostindex'  style='width:100%'>
807
+                            $resultstoprint[] = "<table id='".$prefix2."caresults$hostindex'  style='width:100%'>
808 808
 <tr>
809
-<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcca$hostindex" . "_img'></td>
810
-<td id='" . $prefix2 . "srcca$hostindex'>
811
-" . _("testing...") . "
809
+<td class='icon_td'><img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcca$hostindex"."_img'></td>
810
+<td id='" . $prefix2."srcca$hostindex'>
811
+"._("testing...")."
812 812
 </td>
813 813
 </tr>
814 814
 </table>";
@@ -816,26 +816,26 @@  discard block
 block discarded – undo
816 816
                         }
817 817
                         $clientstest = [];
818 818
                         foreach ($rfc7585suite->NAPTR_hostname_records as $hostindex => $addr) {
819
-                            $clientstest[] = '<p><strong>' . $addr['IP'] . ' TCP/' . $addr['port'] . '</strong></p><ol>';
820
-                            $clientstest[] = "<span id='" . $prefix2 . "clientresults$hostindex$clinx'><table style='width:100%'>
819
+                            $clientstest[] = '<p><strong>'.$addr['IP'].' TCP/'.$addr['port'].'</strong></p><ol>';
820
+                            $clientstest[] = "<span id='".$prefix2."clientresults$hostindex$clinx'><table style='width:100%'>
821 821
 <tr>
822 822
 <td class='icon_td'>";
823
-                            if ($i == 4 ) {
823
+                            if ($i == 4) {
824 824
                                 $clientstest[] = "<!--";
825 825
                             }
826
-                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='" . $prefix2 . "srcclient$hostindex" . "_img'></td>
827
-<td id='" . $prefix2 . "srcclient$hostindex'>
828
-" . _("testing...");
826
+                            $clientstest[] = "<img src='../resources/images/icons/loading51.gif' id='".$prefix2."srcclient$hostindex"."_img'></td>
827
+<td id='" . $prefix2."srcclient$hostindex'>
828
+"._("testing...");
829 829
 
830
-                            if ($i == 4 ) {
831
-                                $clientstest[] = "-->" . _("not implemented yet");
830
+                            if ($i == 4) {
831
+                                $clientstest[] = "-->"._("not implemented yet");
832 832
                             }
833 833
                             $clientstest[] = "</td></tr></table></span>";
834 834
                             $clientstest[] = '</ol>';
835 835
                         }
836 836
                         echo '<div style="align:'.$end.';">';
837 837
                         echo join('', $resultstoprint);
838
-                        echo '<span id="' . $prefix2 . 'clientstest" style="display: none;"><p><hr><b>' . _('Checking if certificates from  CAs are accepted...') . '</b><p>' . _('A few client certificates will be tested to check if servers are resistant to some certificate problems.') . '<p>';
838
+                        echo '<span id="'.$prefix2.'clientstest" style="display: none;"><p><hr><b>'._('Checking if certificates from  CAs are accepted...').'</b><p>'._('A few client certificates will be tested to check if servers are resistant to some certificate problems.').'<p>';
839 839
                         print join('', $clientstest);
840 840
                         echo '</span>';
841 841
                         echo '</div>';
@@ -849,7 +849,7 @@  discard block
 block discarded – undo
849 849
                 //     check if truncates/dies on Operator-Name
850 850
                 if ($my_profile !== NULL) {
851 851
                     echo "<div id='tabs-n'><fieldset class='option_container'>
852
-                <legend><strong>" . _("Live login test") . "</strong></legend>";
852
+                <legend><strong>" . _("Live login test")."</strong></legend>";
853 853
                     $prof_compl = $my_profile->getEapMethodsinOrderOfPreference(1);
854 854
                     if (count($prof_compl) > 0) {
855 855
                         $passwordReqired = FALSE;
@@ -862,34 +862,34 @@  discard block
 block discarded – undo
862 862
                                 $clientCertRequired = TRUE;
863 863
                             }
864 864
                         }
865
-                        echo "<div id='disposable_credential_container'><p>" . _("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.") . "</p>
866
-                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.") . "</p>
867
-                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!") . "</p></div>
865
+                        echo "<div id='disposable_credential_container'><p>"._("If you enter an existing login credential here, you can test the actual authentication from various checkpoints all over the world.")."</p>
866
+                    <p>" . _("The test will use all EAP types you have set in your profile information to check whether the right CAs and server names are used, and of course whether the login with these credentials and the given EAP type actually worked. If you have set anonymous outer ID, the test will use that.")."</p>
867
+                    <p>" . _("Note: the tool purposefully does not offer you to save these credentials, and they will never be saved in any way on the server side. Please use only <strong>temporary test accounts</strong> here; permanently valid test accounts in the wild are considered harmful!")."</p></div>
868 868
                     <form enctype='multipart/form-data' id='live_form' accept-charset='UTF-8'>
869 869
                     <input type='hidden' name='test_type' value='udp_login'>
870
-                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang() . "'>
871
-                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier . "'>
870
+                    <input type='hidden' name='lang' value='" . $gui->languageInstance->getLang()."'>
871
+                    <input type='hidden' name='profile_id' value='" . $my_profile->identifier."'>
872 872
                     <table id='live_tests'>";
873 873
 // if any password based EAP methods are available enable this section
874 874
                         if ($passwordReqired) {
875
-                            echo "<tr><td colspan='2'><strong>" . _("Password-based EAP types") . "</strong></td></tr>
876
-                        <tr><td>" . _("Real (inner) username:") . "</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
877
-                            echo "<tr><td>" . _("Anonymous outer ID (optional):") . "</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
878
-                            echo "<tr><td>" . _("Password:") . "</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
875
+                            echo "<tr><td colspan='2'><strong>"._("Password-based EAP types")."</strong></td></tr>
876
+                        <tr><td>" . _("Real (inner) username:")."</td><td><input type='text' id='username' class='mandatory' name='username'/></td></tr>";
877
+                            echo "<tr><td>"._("Anonymous outer ID (optional):")."</td><td><input type='text' id='outer_username' name='outer_username'/></td></tr>";
878
+                            echo "<tr><td>"._("Password:")."</td><td><input type='text' id='password' class='mandatory' name='password'/></td></tr>";
879 879
                         }
880 880
                         // ask for cert + privkey if TLS-based method is active
881 881
                         if ($clientCertRequired) {
882
-                            echo "<tr><td colspan='2'><strong>" . _("Certificate-based EAP types") . "</strong></td></tr>
883
-                        <tr><td>" . _("Certificate file (.p12 or .pfx):") . "</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
884
-                        <tr><td>" . _("Certificate password, if any:") . "</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
885
-                        <tr><td>" . _("Username, if different from certificate Subject:") . "</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
882
+                            echo "<tr><td colspan='2'><strong>"._("Certificate-based EAP types")."</strong></td></tr>
883
+                        <tr><td>" . _("Certificate file (.p12 or .pfx):")."</td><td><input type='file' id='cert' accept='application/x-pkcs12' name='cert'/></td></tr>
884
+                        <tr><td>" . _("Certificate password, if any:")."</td><td><input type='text' id='privkey' name='privkey_pass'/></td></tr>
885
+                        <tr><td>" . _("Username, if different from certificate Subject:")."</td><td><input type='text' id='tls_username' name='tls_username'/></td></tr>";
886 886
                         }
887
-                        echo "<tr><td colspan='2'><button id='submit_credentials'>" . _("Submit credentials") . "</button></td></tr></table></form>";
887
+                        echo "<tr><td colspan='2'><button id='submit_credentials'>"._("Submit credentials")."</button></td></tr></table></form>";
888 888
                         echo "<div id='live_login_results' style='display:none'>";
889 889
                         foreach (\config\Diagnostics::RADIUSTESTS['UDP-hosts'] as $hostindex => $host) {
890 890
                             print "<hr>";
891
-                            printf(_("Testing from: %s"), "<strong>" . \config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name'] . "</strong>");
892
-                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src" . $hostindex . "_img' style='width:24px; position: absolute; $start: 20px; bottom: 0px; '></span>";
891
+                            printf(_("Testing from: %s"), "<strong>".\config\Diagnostics::RADIUSTESTS['UDP-hosts'][$hostindex]['display_name']."</strong>");
892
+                            print "<span style='position:relative'><img src='../resources/images/icons/loading51.gif' id='live_src".$hostindex."_img' style='width:24px; position: absolute; $start: 20px; bottom: 0px; '></span>";
893 893
                             print "<div id='eap_test$hostindex' class='eap_test_results'></div>";
894 894
                         }
895 895
                         echo "</div>";
@@ -904,9 +904,9 @@  discard block
 block discarded – undo
904 904
             }
905 905
 
906 906
             if (isset($_POST['comefrom'])) {
907
-                $return = htmlspecialchars_decode($_POST['comefrom']) . ( $inst_id ? "?inst_id=" . $inst_id : "" );
907
+                $return = htmlspecialchars_decode($_POST['comefrom']).($inst_id ? "?inst_id=".$inst_id : "");
908 908
                 echo "<form method='post' action='$return' accept-charset='UTF-8'>
909
-                    <button type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_CLOSE . "'>" . sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp) . "</button>"
909
+                    <button type='submit' name='submitbutton' value='".web\lib\common\FormElements::BUTTON_CLOSE."'>".sprintf(_("Return to %s administrator area"), core\common\Entity::$nomenclature_idp)."</button>"
910 910
                 . "</form>";
911 911
             }
912 912
             if ($check_realm !== FALSE) {
Please login to merge, or discard this patch.
web/lib/common/InputValidation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     private function inputValidationError($customtext)
41 41
     {
42 42
         \core\common\Entity::intoThePotatoes();
43
-        $retval = "<p>" . _("Input validation error: ") . $customtext . "</p>";
43
+        $retval = "<p>"._("Input validation error: ").$customtext."</p>";
44 44
         \core\common\Entity::outOfThePotatoes();
45 45
         return $retval;
46 46
     }
@@ -135,18 +135,18 @@  discard block
 block discarded – undo
135 135
             }
136 136
             if ($user->isFederationAdmin($temp->federation)) {
137 137
                 $this->loggerInstance->debug(4, "You are fed admin for this IdP\n");
138
-                return [$temp,'readonly'];
138
+                return [$temp, 'readonly'];
139 139
             }
140 140
             if ($user->isSuperadmin()) {
141 141
                 $this->loggerInstance->debug(4, "You are the superadmin\n");
142
-                return [$temp,'readonly'];                
142
+                return [$temp, 'readonly'];                
143 143
             }
144 144
             throw new Exception($this->inputValidationError("This IdP identifier is not accessible!"));
145 145
         }
146 146
         if ($claimedFedBinding !== NULL && strtoupper($temp->federation) != strtoupper($claimedFedBinding->tld)) {
147 147
             throw new Exception($this->inputValidationError("This IdP does not belong to the claimed federation!"));
148 148
         }
149
-        return [$temp,'nouser'];
149
+        return [$temp, 'nouser'];
150 150
     }
151 151
 
152 152
     /**
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
         try {
589 589
             $image->readImageBlob($binary);
590 590
         } catch (\ImagickException $exception) {
591
-            echo "Error" . $exception->getMessage();
591
+            echo "Error".$exception->getMessage();
592 592
             return FALSE;
593 593
         }
594 594
         // image survived the sanity check
Please login to merge, or discard this patch.
core/AbstractProfile.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                     // for now (no OpenRoaming client certs available) only run server-side tests
305 305
                     foreach ($listOfIPs as $oneIP) {
306 306
                         $connectionResult = $connectionTests->cApathCheck($oneIP);
307
-                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
307
+                        if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) {
308 308
                             $allHostsOkay = FALSE;
309 309
                         } else {
310 310
                             $oneHostOkay = TRUE;
@@ -913,7 +913,7 @@  discard block
 block discarded – undo
913 913
         $profileStatus = self::CERT_STATUS_OK;
914 914
         foreach ($rows as $row) {
915 915
             $encodedCert = $row[0];
916
-            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time();
916
+            $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time();
917 917
             if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) {
918 918
                 $certStatus = self::CERT_STATUS_ERROR;
919 919
             } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) {
Please login to merge, or discard this patch.
utils/test_openroaming.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * License: see the web/copyright.php file in the file structure
9 9
  * ******************************************************************************
10 10
  */
11
-require_once dirname(dirname(__FILE__)) . "/config/_config.php";
11
+require_once dirname(dirname(__FILE__))."/config/_config.php";
12 12
 
13 13
 /**
14 14
  * The sctipt will be called from crontab
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-while ( $row = mysqli_fetch_object($allOpenRoamingProfiles)) {
31
+while ($row = mysqli_fetch_object($allOpenRoamingProfiles)) {
32 32
     $profileId = $row->profile_id;
33 33
     print "$profileId\n";
34 34
     $profile = \core\ProfileFactory::instantiate($profileId);
Please login to merge, or discard this patch.
web/admin/overview_federation.php 1 patch
Spacing   +39 added lines, -39 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
 
24 24
 $deco = new \web\lib\admin\PageDecoration();
25 25
 $uiElements = new web\lib\admin\UIElements();
@@ -72,16 +72,16 @@  discard block
 block discarded – undo
72 72
     <div class="infobox">
73 73
         <h2><?php $tablecaption = _("Your Personal Information"); echo $tablecaption; ?></h2>
74 74
         <table>
75
-            <caption><?php echo $tablecaption;?></caption>
75
+            <caption><?php echo $tablecaption; ?></caption>
76 76
             <tr>
77
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
78
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
79
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
77
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
78
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
79
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
80 80
             </tr>            
81 81
             <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?>
82 82
             <tr>
83 83
                 <td>
84
-                    <?php echo "" . _("Unique Identifier") ?>
84
+                    <?php echo ""._("Unique Identifier") ?>
85 85
                 </td>
86 86
                 <td>
87 87
                 </td>
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     </div>
94 94
 
95 95
     <form action='overview_certificates.php' method='GET' accept-charset='UTF-8'>
96
-        <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management'));?></button>
96
+        <button type='submit'><?php echo sprintf(_('RADIUS/TLS Certificate management')); ?></button>
97 97
     </form>
98 98
 
99 99
     <?php
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
         $feds = [['name'=>' user:fedadmin', 'value' => $fed_id]];
111 111
     } elseif (!$user->isFederationAdmin()) {
112
-        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>";
112
+        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>";
113 113
         echo $deco->footer();
114 114
         exit(0);
115 115
     } else {
@@ -123,16 +123,16 @@  discard block
 block discarded – undo
123 123
                 <?php $tablecaption2 = sprintf(_("%s Properties: %s"), $uiElements->nomenclatureFed, $thefed->name); echo $tablecaption2; ?>
124 124
             </h2>
125 125
             <table>
126
-            <caption><?php echo $tablecaption2;?></caption>
126
+            <caption><?php echo $tablecaption2; ?></caption>
127 127
             <tr>
128
-                <th class="wai-invisible" scope="col"><?php echo _("Property Type");?></th>
129
-                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable");?></th>
130
-                <th class="wai-invisible" scope="col"><?php echo _("Property Value");?></th>
128
+                <th class="wai-invisible" scope="col"><?php echo _("Property Type"); ?></th>
129
+                <th class="wai-invisible" scope="col"><?php echo _("Language if applicable"); ?></th>
130
+                <th class="wai-invisible" scope="col"><?php echo _("Property Value"); ?></th>
131 131
             </tr>
132 132
                 <!-- fed properties -->
133 133
                 <tr>
134 134
                     <td>
135
-                        <?php echo "" . _("Country") ?>
135
+                        <?php echo ""._("Country") ?>
136 136
                     </td>
137 137
                     <td>
138 138
                     </td>
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                     default:
217 217
                         throw new Exception("Error: unknown encryption status of invitation!?!");
218 218
                 }
219
-                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully."));
219
+                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully."));
220 220
                 break;
221 221
             case "FAILURE":
222 222
                 echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!"));
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
                     default:
237 237
                         throw new Exception("Error: unknown encryption status of invitation!?!");
238 238
                 }
239
-                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success."));
239
+                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success."));
240 240
                 break;
241 241
             case "INVALIDSYNTAX":
242 242
                 echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!"));
@@ -252,27 +252,27 @@  discard block
 block discarded – undo
252 252
     } else {
253 253
         $link = 'http://';
254 254
     }
255
-    $link .= $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];
255
+    $link .= $_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME'];
256 256
     $link = htmlspecialchars($link);
257 257
     if (\config\Master::FUNCTIONALITY_LOCATIONS['CONFASSISTANT_RADIUS'] == 'LOCAL' && \config\Master::FUNCTIONALITY_LOCATIONS['DIAGNOSTICS'] == 'LOCAL') {
258 258
         echo "<table><tr>
259
-                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP) . "</td>
259
+                        <td>" . sprintf(_("Diagnose reachability and connection parameters of any %s %s"), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureIdP)."</td>
260 260
                         <td><form method='post' action='../diag/action_realmcheck.php' accept-charset='UTF-8'>
261 261
                               <input type='hidden' name='comefrom' id='comefrom' value='$link'/>
262
-                              <button id='realmcheck' style='cursor:pointer;' type='submit'>" . _("Go!") . "</button>
262
+                              <button id='realmcheck' style='cursor:pointer;' type='submit'>"._("Go!")."</button>
263 263
                             </form>
264 264
                         </td>
265 265
                     </tr>
266 266
                     </table>";
267 267
     }
268 268
     if (\config\ConfAssistant::CONSORTIUM['name'] == 'eduroam') {
269
-        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>";
269
+        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>";
270 270
     } else {
271 271
         $helptext = "";
272 272
     }
273 273
     ?>
274 274
     <table class='user_overview' style='border:0px; width:unset'>
275
-        <caption><?php echo _("Participant Details");?></caption>
275
+        <caption><?php echo _("Participant Details"); ?></caption>
276 276
         <tr>
277 277
             <th scope='col'><?php echo sprintf(_("%s Name"), $uiElements->nomenclatureParticipant); ?></th>
278 278
             <th scope='col'><?php echo _("Status") ?></th>
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             $pending_invites = $mgmt->listPendingInvitations();
283 283
 
284 284
             if (\config\Master::DB['enforce-external-sync']) {
285
-                echo "<th scope='col'>" . sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</th>";
285
+                echo "<th scope='col'>".sprintf(_("%s Database Sync Status"), \config\ConfAssistant::CONSORTIUM['display_name'])."</th>";
286 286
             }
287 287
             ?>
288 288
             <th scope='col'>
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
             $fedId = strtoupper($onefed['value']);
300 300
             $thefed = new \core\Federation($fedId);
301 301
             /// nomenclature for 'federation', federation name, nomenclature for 'inst'
302
-            echo "<tr><td colspan='9'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>";
303
-            echo "<tr><td colspan='4'><strong>". _("Quick search:")." </strong><input style='background:#eeeeee;' type='text' id='qsearch_" . $fedId . "'></td>";
304
-            echo "<td colspan='6' style='border-bottom-style: dotted;border-bottom-width: 1px;'><input type='checkbox' name='unlinked' id='unlinked_ck_" . $fedId . "'> ". _("Only not linked"). "</td>";
302
+            echo "<tr><td colspan='9'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>";
303
+            echo "<tr><td colspan='4'><strong>"._("Quick search:")." </strong><input style='background:#eeeeee;' type='text' id='qsearch_".$fedId."'></td>";
304
+            echo "<td colspan='6' style='border-bottom-style: dotted;border-bottom-width: 1px;'><input type='checkbox' name='unlinked' id='unlinked_ck_".$fedId."'> "._("Only not linked")."</td>";
305 305
             echo "</tr>";
306 306
             // extract only pending invitations for *this* fed
307 307
             $display_pendings = FALSE;
@@ -351,16 +351,16 @@  discard block
 block discarded – undo
351 351
                 }
352 352
                 echo "<td style='vertical-align:top;' class='inst_td'>
353 353
                          <input type='hidden' name='inst' value='" 
354
-                        . $index . "'>"
354
+                        . $index."'>"
355 355
                         . "<span style='display:none' class='inst_name'>".$my_idp."</span>"
356
-                        . "<span>". $idp_instance->name . "</span>"
356
+                        . "<span>".$idp_instance->name."</span>"
357 357
                         . " (<a href='overview_org.php?inst_id="
358
-                        . $idp_instance->identifier . "'>" 
358
+                        . $idp_instance->identifier."'>" 
359 359
                         . (in_array($index, $userIdps) ? _("manage") : _("view"))
360 360
                         . "</a>)"
361
-                        . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>" ) 
361
+                        . (empty($listOfSilverbulletRealms) ? "" : "<ul><li>") 
362 362
                         . implode("</li><li>", $listOfSilverbulletRealms) 
363
-                        . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>" )
363
+                        . (empty($listOfSilverbulletRealms) ? "" : "</li><ul>")
364 364
                         . "</td>";
365 365
                 // deployment status; need to dive into profiles for this
366 366
                 // show happy eyeballs if at least one profile is configured/showtime                    
@@ -402,8 +402,8 @@  discard block
 block discarded – undo
402 402
                 if (\config\Master::DB['enforce-external-sync']) {
403 403
                     echo "<td style='display: ruby;'>";
404 404
                     if ($readonly === FALSE) {
405
-                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
406
-                                    <button type='submit'>" . _("Manage DB Link") . "</button>&nbsp;&nbsp;";
405
+                        echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
406
+                                    <button type='submit'>" . _("Manage DB Link")."</button>&nbsp;&nbsp;";
407 407
                     }
408 408
                     switch ($idpLinked) {
409 409
                         case 'nosync':
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 //                            echo "<div class='acceptable'>" . _("Linked") . "</div>";
413 413
                             break;
414 414
                         case 'notlinked':
415
-                            echo "<span class='notacceptable'>" . _("NOT linked") . "</span>";
415
+                            echo "<span class='notacceptable'>"._("NOT linked")."</span>";
416 416
                             break;
417 417
                     }
418 418
                     echo "</form>";
@@ -422,9 +422,9 @@  discard block
 block discarded – undo
422 422
                 echo "<td style='vertical-align: top;'>";
423 423
                 if ($readonly === FALSE) {
424 424
                     echo "<div style='white-space: nowrap;'>
425
-                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
425
+                                  <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'>
426 426
                                       <button type='submit'>" .
427
-                    _("Add/Remove Administrators") . "
427
+                    _("Add/Remove Administrators")."
428 428
                                       </button>
429 429
                                   </form>
430 430
                                 </div>";
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
                 echo "<tr>
438 438
                             <td colspan='2'>
439 439
                                <strong>" .
440
-                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . "
440
+                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)."
441 441
                                </strong>
442 442
                             </td>
443 443
                          </tr>";
@@ -445,16 +445,16 @@  discard block
 block discarded – undo
445 445
                     if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) {
446 446
                         echo "<tr>
447 447
                                     <td>" .
448
-                        $oneinvite['name'] . "
448
+                        $oneinvite['name']."
449 449
                                     </td>
450 450
                                     <td>" .
451
-                        $oneinvite['mail'] . "
451
+                        $oneinvite['mail']."
452 452
                                     </td>
453 453
                                     <td colspan=2>";
454 454
                         if ($readonly === FALSE) {
455 455
                             echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'>
456
-                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/>
457
-                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> "
456
+                                <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/>
457
+                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> "
458 458
                             . sprintf(_("(expires %s)"), $oneinvite['expiry'])
459 459
                             . "</form>";
460 460
                         }
Please login to merge, or discard this patch.