| @@ -21,7 +21,7 @@ discard block | ||
| 21 | 21 | |
| 22 | 22 | namespace core; | 
| 23 | 23 | |
| 24 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; | |
| 24 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; | |
| 25 | 25 | |
| 26 | 26 | $instMgmt = new \core\UserManagement(); | 
| 27 | 27 | $deco = new \web\lib\admin\PageDecoration(); | 
| @@ -51,7 +51,7 @@ discard block | ||
| 51 | 51 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> | 
| 52 | 52 | <tr> | 
| 53 | 53 | <td> | 
| 54 | -<?php echo "" . _("Unique Identifier") ?> | |
| 54 | +<?php echo ""._("Unique Identifier") ?> | |
| 55 | 55 | </td> | 
| 56 | 56 | <td> | 
| 57 | 57 | </td> | 
| @@ -64,14 +64,14 @@ discard block | ||
| 64 | 64 | <div> | 
| 65 | 65 | <?php | 
| 66 | 66 |          if (CONFIG['DB']['USER']['readonly'] === FALSE) { | 
| 67 | -            echo "<a href='edit_user.php'><button>" . _("Edit User Details") . "</button></a>"; | |
| 67 | +            echo "<a href='edit_user.php'><button>"._("Edit User Details")."</button></a>"; | |
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | 70 |          if ($user->isFederationAdmin()) { | 
| 71 | -            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed) . "</button></form>"; | |
| 71 | +            echo "<form action='overview_federation.php' method='GET' accept-charset='UTF-8'><button type='submit'>".sprintf(_('Click here for %s management tasks'), $uiElements->nomenclatureFed)."</button></form>"; | |
| 72 | 72 | } | 
| 73 | 73 |          if ($user->isSuperadmin()) { | 
| 74 | -            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>" . _('Click here to access the superadmin page') . "</button></form>"; | |
| 74 | +            echo "<form action='112365365321.php' method='GET' accept-charset='UTF-8'><button type='submit'>"._('Click here to access the superadmin page')."</button></form>"; | |
| 75 | 75 | } | 
| 76 | 76 | ?> | 
| 77 | 77 | </div> | 
| @@ -83,7 +83,7 @@ discard block | ||
| 83 | 83 |          if (CONFIG['FUNCTIONALITY_LOCATIONS']['CONFASSISTANT_SILVERBULLET'] == "LOCAL") { | 
| 84 | 84 | $target = "https://wiki.geant.org/x/6Zg7Bw"; // Managed IdP manual | 
| 85 | 85 | } | 
| 86 | -        $helptext = "<h3 style='display:inline;'>" . sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst) . "</h3>"; | |
| 86 | +        $helptext = "<h3 style='display:inline;'>".sprintf(_("(Need help? Refer to the <a href='%s'>%s administrator manual</a>)"), $target, $uiElements->nomenclatureInst)."</h3>"; | |
| 87 | 87 |      } else { | 
| 88 | 88 | $helptext = ""; | 
| 89 | 89 | } | 
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 | // we need to run the Federation constructor | 
| 93 | 93 | $cat = new \core\CAT; | 
| 94 | 94 | /// first parameter: number of Identity Providers; second param is the literal configured term for 'Identity Provider' (you may or may not be able to add a plural suffix for your locale) | 
| 95 | -        echo "<h2>" . sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst) . "</h2>"; | |
| 95 | +        echo "<h2>".sprintf(ngettext("You are managing the following <span style='display:none'>%d </span>%s:", "You are managing the following <strong>%d</strong> %s:", sizeof($hasInst)), sizeof($hasInst), $uiElements->nomenclatureInst)."</h2>"; | |
| 96 | 96 | $instlist = []; | 
| 97 | 97 | $my_idps = []; | 
| 98 | 98 | $myFeds = []; | 
| @@ -114,10 +114,10 @@ discard block | ||
| 114 | 114 | $country[$key] = $row['country']; | 
| 115 | 115 | $name[$key] = $row['name']; | 
| 116 | 116 | } | 
| 117 | -        echo "<tr><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureInst) . "</th><th>" . sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst) . "</th><th>" . ( CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "") . "</th></tr>"; | |
| 117 | +        echo "<tr><th>".sprintf(_("%s Name"), $uiElements->nomenclatureInst)."</th><th>".sprintf(_("Other admins of this %s"), $uiElements->nomenclatureInst)."</th><th>".(CONFIG['DB']['INST']['readonly'] === FALSE ? _("Administrator Management") : "")."</th></tr>"; | |
| 118 | 118 |          foreach ($myFeds as $fed_id => $fed_name) { | 
| 119 | 119 | /// nomenclature 'fed', fed name, nomenclature 'inst' | 
| 120 | -            echo "<tr><td colspan='3'><strong>" . sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst) . "</strong></td></tr>"; | |
| 120 | +            echo "<tr><td colspan='3'><strong>".sprintf(_("%s %s: %s list"), $uiElements->nomenclatureFed, $fed_name, $uiElements->nomenclatureInst)."</strong></td></tr>"; | |
| 121 | 121 | |
| 122 | 122 | $fed_idps = $my_idps[$fed_id]; | 
| 123 | 123 | asort($fed_idps); | 
| @@ -125,7 +125,7 @@ discard block | ||
| 125 | 125 | $oneinst = $instlist[$index]; | 
| 126 | 126 | $the_inst = $oneinst['object']; | 
| 127 | 127 | |
| 128 | - echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>" . $oneinst['name'] . "</a></td><td>"; | |
| 128 | + echo "<tr><td><a href='overview_idp.php?inst_id=$the_inst->identifier'>".$oneinst['name']."</a></td><td>"; | |
| 129 | 129 | echo "<input type='hidden' name='inst' value='$the_inst->identifier'>"; | 
| 130 | 130 | $admins = $the_inst->listOwners(); | 
| 131 | 131 | $blessedUser = FALSE; | 
| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 | $coadmin = new \core\User($username['ID']); | 
| 135 | 135 |                          $coadmin_name = $coadmin->getAttributes('user:realname'); | 
| 136 | 136 |                          if (count($coadmin_name) > 0) { | 
| 137 | - echo $coadmin_name[0]['value'] . "<br/>"; | |
| 137 | + echo $coadmin_name[0]['value']."<br/>"; | |
| 138 | 138 | unset($admins[$number]); | 
| 139 | 139 | } | 
| 140 | 140 |                      } else { // don't list self | 
| @@ -150,25 +150,25 @@ discard block | ||
| 150 | 150 | } | 
| 151 | 151 | echo "</td><td>"; | 
| 152 | 152 |                  if ($blessedUser && CONFIG['DB']['INST']['readonly'] === FALSE) { | 
| 153 | -                    echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $the_inst->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>" . _("Add/Remove Administrators") . "</button></form></div>"; | |
| 153 | +                    echo "<div style='white-space: nowrap;'><form method='post' action='inc/manageAdmins.inc.php?inst_id=".$the_inst->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'><button type='submit'>"._("Add/Remove Administrators")."</button></form></div>"; | |
| 154 | 154 | } | 
| 155 | 155 | echo "</td></tr>"; | 
| 156 | 156 | } | 
| 157 | 157 | } | 
| 158 | 158 | echo "</table>"; | 
| 159 | 159 |      } else { | 
| 160 | -        echo "<h2>" . sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst) . "</h2>"; | |
| 160 | +        echo "<h2>".sprintf(_("You are not managing any %s."), $uiElements->nomenclatureInst)."</h2>"; | |
| 161 | 161 | } | 
| 162 | 162 |      if (CONFIG['DB']['INST']['readonly'] === FALSE) { | 
| 163 | 163 |          if (CONFIG_CONFASSISTANT['CONSORTIUM']['selfservice_registration'] === NULL) { | 
| 164 | -            echo "<p>" . sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst) . "</p>"; | |
| 164 | +            echo "<p>".sprintf(_("Please ask your %s administrator to invite you to become an %s administrator."), $uiElements->nomenclatureFed, $uiElements->nomenclatureInst)."</p>"; | |
| 165 | 165 | echo "<hr/> | 
| 166 | 166 | <div style='white-space: nowrap;'> | 
| 167 | 167 | <form action='action_enrollment.php' method='get' accept-charset='UTF-8'>" . | 
| 168 | -            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst) . | |
| 168 | +            sprintf(_("Did you receive an invitation token to manage an %s? Please paste it here:"), $uiElements->nomenclatureInst). | |
| 169 | 169 | " <input type='text' id='token' name='token'/> | 
| 170 | 170 | <button type='submit'>" . | 
| 171 | -            _("Go!") . " | |
| 171 | +            _("Go!")." | |
| 172 | 172 | </button> | 
| 173 | 173 | </form> | 
| 174 | 174 | </div>"; | 
| @@ -177,7 +177,7 @@ discard block | ||
| 177 | 177 | <div style='white-space: nowrap;'> | 
| 178 | 178 | <form action='action_enrollment.php' method='get'><button type='submit' accept-charset='UTF-8'> | 
| 179 | 179 | <input type='hidden' id='token' name='token' value='SELF-REGISTER'/>" . | 
| 180 | -            sprintf(_("New %s Registration"), $uiElements->nomenclatureInst) . " | |
| 180 | +            sprintf(_("New %s Registration"), $uiElements->nomenclatureInst)." | |
| 181 | 181 | </button> | 
| 182 | 182 | </form> | 
| 183 | 183 | </div>"; | 
| @@ -19,7 +19,7 @@ discard block | ||
| 19 | 19 | * <base_url>/copyright.php after deploying the software | 
| 20 | 20 | */ | 
| 21 | 21 | |
| 22 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; | |
| 22 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; | |
| 23 | 23 | |
| 24 | 24 | $deco = new \web\lib\admin\PageDecoration(); | 
| 25 | 25 | $uiElements = new web\lib\admin\UIElements(); | 
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | <?php echo $uiElements->infoblock($user->getAttributes(), "user", "User"); ?> | 
| 48 | 48 | <tr> | 
| 49 | 49 | <td> | 
| 50 | -                    <?php echo "" . _("Unique Identifier") ?> | |
| 50 | +                    <?php echo ""._("Unique Identifier") ?> | |
| 51 | 51 | </td> | 
| 52 | 52 | <td> | 
| 53 | 53 | </td> | 
| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | $mgmt = new \core\UserManagement(); | 
| 63 | 63 | |
| 64 | 64 |      if (!$user->isFederationAdmin()) { | 
| 65 | -        echo "<p>" . sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed) . "</p>"; | |
| 65 | +        echo "<p>".sprintf(_("You are not a %s manager."), $uiElements->nomenclatureFed)."</p>"; | |
| 66 | 66 | echo $deco->footer(); | 
| 67 | 67 | exit(0); | 
| 68 | 68 | } | 
| @@ -79,7 +79,7 @@ discard block | ||
| 79 | 79 | <!-- fed properties --> | 
| 80 | 80 | <tr> | 
| 81 | 81 | <td> | 
| 82 | -                        <?php echo "" . _("Country") ?> | |
| 82 | +                        <?php echo ""._("Country") ?> | |
| 83 | 83 | </td> | 
| 84 | 84 | <td> | 
| 85 | 85 | </td> | 
| @@ -160,7 +160,7 @@ discard block | ||
| 160 | 160 | default: | 
| 161 | 161 |                          throw new Exception("Error: unknown encryption status of invitation!?!"); | 
| 162 | 162 | } | 
| 163 | -                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter) . " " . $cryptText, _("Sent successfully.")); | |
| 163 | +                echo $uiElements->boxRemark(ngettext("The invitation email was sent successfully.", "All invitation emails were sent successfully.", $counter)." ".$cryptText, _("Sent successfully.")); | |
| 164 | 164 | break; | 
| 165 | 165 | case "FAILURE": | 
| 166 | 166 |                  echo $uiElements->boxError(_("No invitation email could be sent!"), _("Sending failure!")); | 
| @@ -180,7 +180,7 @@ discard block | ||
| 180 | 180 | default: | 
| 181 | 181 |                          throw new Exception("Error: unknown encryption status of invitation!?!"); | 
| 182 | 182 | } | 
| 183 | -                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter) . " " . $cryptText, _("Partial success.")); | |
| 183 | +                echo $uiElements->boxWarning(sprintf(_("Some invitation emails were sent successfully (%s in total), the others failed."), $counter)." ".$cryptText, _("Partial success.")); | |
| 184 | 184 | break; | 
| 185 | 185 | case "INVALIDSYNTAX": | 
| 186 | 186 |                  echo $uiElements->boxError(_("The invitation email address was malformed, no invitation was sent!"), _("The invitation email address was malformed, no invitation was sent!")); | 
| @@ -191,7 +191,7 @@ discard block | ||
| 191 | 191 | echo "</table></div>"; | 
| 192 | 192 | } | 
| 193 | 193 |      if (CONFIG_CONFASSISTANT['CONSORTIUM']['name'] == 'eduroam') { | 
| 194 | -        $helptext = "<h3>" . sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed) . "</h3>"; | |
| 194 | +        $helptext = "<h3>".sprintf(_("Need help? Refer to the <a href='%s'>%s manual</a>"), "https://wiki.geant.org/x/qJg7Bw", $uiElements->nomenclatureFed)."</h3>"; | |
| 195 | 195 |      } else { | 
| 196 | 196 | $helptext = ""; | 
| 197 | 197 | } | 
| @@ -205,7 +205,7 @@ discard block | ||
| 205 | 205 | $pending_invites = $mgmt->listPendingInvitations(); | 
| 206 | 206 | |
| 207 | 207 |              if (CONFIG['DB']['enforce-external-sync']) { | 
| 208 | -                echo "<th>" . sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name']) . "</th>"; | |
| 208 | +                echo "<th>".sprintf(_("%s Database Sync Status"), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'])."</th>"; | |
| 209 | 209 | } | 
| 210 | 210 | ?> | 
| 211 | 211 | <th> | 
| @@ -220,7 +220,7 @@ discard block | ||
| 220 | 220 |          foreach ($feds as $onefed) { | 
| 221 | 221 | $thefed = new \core\Federation(strtoupper($onefed['value'])); | 
| 222 | 222 | /// nomenclature for 'federation', federation name, nomenclature for 'inst' | 
| 223 | -            echo "<tr><td colspan='8'><strong>" . sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">' . $thefed->name . '</span>') . "</strong></td></tr>"; | |
| 223 | +            echo "<tr><td colspan='8'><strong>".sprintf(_("The following %s are in your %s %s:"), $uiElements->nomenclatureInst, $uiElements->nomenclatureFed, '<span style="color:green">'.$thefed->name.'</span>')."</strong></td></tr>"; | |
| 224 | 224 | |
| 225 | 225 | // extract only pending invitations for *this* fed | 
| 226 | 226 | $display_pendings = FALSE; | 
| @@ -245,27 +245,27 @@ discard block | ||
| 245 | 245 | // deployment status; need to dive into profiles for this | 
| 246 | 246 | // show happy eyeballs if at least one profile is configured/showtime | 
| 247 | 247 | echo "<td>"; | 
| 248 | - echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "" ) . " " . ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : "" ); | |
| 248 | + echo ($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_CONFIGURED ? "C" : "")." ".($idp_instance->maxProfileStatus() >= \core\IdP::PROFILES_SHOWTIME ? "V" : ""); | |
| 249 | 249 | echo "</td>"; | 
| 250 | 250 | // name | 
| 251 | 251 | echo "<td> | 
| 252 | - <input type='hidden' name='inst' value='" . $index . "'>" . $idp_instance->name . " | |
| 252 | + <input type='hidden' name='inst' value='" . $index."'>".$idp_instance->name." | |
| 253 | 253 | </td>"; | 
| 254 | 254 | // external DB sync, if configured as being necessary | 
| 255 | 255 |                  if (CONFIG['DB']['enforce-external-sync']) { | 
| 256 | 256 | echo "<td style='display: ruby;'>"; | 
| 257 | 257 |                      if ($readonly === FALSE) { | 
| 258 | - echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=" . $idp_instance->identifier . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> | |
| 259 | -                                    <button type='submit'>" . _("Manage DB Link") . "</button></form>  "; | |
| 258 | + echo "<form method='post' action='inc/manageDBLink.inc.php?inst_id=".$idp_instance->identifier."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> | |
| 259 | +                                    <button type='submit'>" . _("Manage DB Link")."</button></form>  "; | |
| 260 | 260 | } | 
| 261 | 261 |                      switch ($idp_instance->getExternalDBSyncState()) { | 
| 262 | 262 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOTSUBJECTTOSYNCING: | 
| 263 | 263 | break; | 
| 264 | 264 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: | 
| 265 | -                            echo "<div class='acceptable'>" . _("Linked") . "</div>"; | |
| 265 | +                            echo "<div class='acceptable'>"._("Linked")."</div>"; | |
| 266 | 266 | break; | 
| 267 | 267 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: | 
| 268 | -                            echo "<div class='notacceptable'>" . _("NOT linked") . "</div>"; | |
| 268 | +                            echo "<div class='notacceptable'>"._("NOT linked")."</div>"; | |
| 269 | 269 | |
| 270 | 270 | |
| 271 | 271 | break; | 
| @@ -278,9 +278,9 @@ discard block | ||
| 278 | 278 | echo "<td>"; | 
| 279 | 279 |                  if ($readonly === FALSE) { | 
| 280 | 280 | echo "<div style='white-space: nowrap;'> | 
| 281 | - <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index . "' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> | |
| 281 | + <form method='post' action='inc/manageAdmins.inc.php?inst_id=" . $index."' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8'> | |
| 282 | 282 | <button type='submit'>" . | 
| 283 | -                    _("Add/Remove Administrators") . " | |
| 283 | +                    _("Add/Remove Administrators")." | |
| 284 | 284 | </button> | 
| 285 | 285 | </form> | 
| 286 | 286 | </div>"; | 
| @@ -293,7 +293,7 @@ discard block | ||
| 293 | 293 | echo "<tr> | 
| 294 | 294 | <td colspan='2'> | 
| 295 | 295 | <strong>" . | 
| 296 | -                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed) . " | |
| 296 | +                sprintf(_("Pending invitations in the %s:"), $uiElements->nomenclatureFed)." | |
| 297 | 297 | </strong> | 
| 298 | 298 | </td> | 
| 299 | 299 | </tr>"; | 
| @@ -301,17 +301,17 @@ discard block | ||
| 301 | 301 |                      if (strtoupper($oneinvite['country']) == strtoupper($thefed->tld)) { | 
| 302 | 302 | echo "<tr> | 
| 303 | 303 | <td>" . | 
| 304 | - $oneinvite['name'] . " | |
| 304 | + $oneinvite['name']." | |
| 305 | 305 | </td> | 
| 306 | 306 | <td>" . | 
| 307 | - $oneinvite['mail'] . " | |
| 307 | + $oneinvite['mail']." | |
| 308 | 308 | </td> | 
| 309 | 309 | <td colspan=2>"; | 
| 310 | 310 |                          if ($readonly === FALSE) { | 
| 311 | 311 | echo "<form method='post' action='overview_federation.php' accept-charset='UTF-8'> | 
| 312 | - <input type='hidden' name='invitation_id' value='" . $oneinvite['token'] . "'/> | |
| 313 | -                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Revoke Invitation") . "</button> " | |
| 314 | -                              . sprintf(_("(expires %s)"),$oneinvite['expiry']) | |
| 312 | + <input type='hidden' name='invitation_id' value='" . $oneinvite['token']."'/> | |
| 313 | +                                <button class='delete' type='submit' name='submitbutton' value='" . web\lib\common\FormElements::BUTTON_DELETE."'>"._("Revoke Invitation")."</button> " | |
| 314 | +                              . sprintf(_("(expires %s)"), $oneinvite['expiry']) | |
| 315 | 315 | . "</form>"; | 
| 316 | 316 | } | 
| 317 | 317 | echo " </td> |