|  | @@ -21,7 +21,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                                                                                                                        
                                                        |  | @@ -146,29 +146,29 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 146 | 146 |                  } | 
                                                                                                            
                                                            | 147 | 147 |                  $otherAdminCount = count($admins); // only the unnamed remain | 
                                                                                                            
                                                            | 148 | 148 |                  if ($otherAdminCount > 0) { | 
                                                                                                            
                                                            | 149 |  | -                    echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount),$otherAdminCount); | 
                                                                                                            
                                                            |  | 149 | +                    echo sprintf(ngettext("%d other user", "%d other users", $otherAdminCount), $otherAdminCount); | 
                                                                                                            
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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>"; |