Passed
Push — release_2_1 ( 53e78a...79034c )
by Tomasz
09:38
created
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.