@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | // for now (no OpenRoaming client certs available) only run server-side tests |
| 333 | 333 | foreach ($listOfIPs as $oneIP) { |
| 334 | 334 | $connectionResult = $connectionTests->cApathCheck($oneIP); |
| 335 | - if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || ( isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
| 335 | + if ($connectionResult != \core\diag\AbstractTest::RETVAL_OK || (isset($connectionTests->TLS_CA_checks_result['cert_oddity']) && count($connectionTests->TLS_CA_checks_result['cert_oddity']) > 0)) { |
|
| 336 | 336 | $allHostsOkay = FALSE; |
| 337 | 337 | } else { |
| 338 | 338 | $oneHostOkay = TRUE; |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | // which is different from the outer username we put into installers |
| 487 | 487 | return $this->getAttributes("internal:checkuser_value")[0]['value']."@".$realm; |
| 488 | 488 | } |
| 489 | - if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL ) { |
|
| 489 | + if (count($this->getAttributes("internal:use_anon_outer")) > 0 && $this->getAttributes("internal:anon_local_value")[0]['value'] != NULL) { |
|
| 490 | 490 | // no special check username, but there is an anon outer ID for |
| 491 | 491 | // installers - so let's use that one |
| 492 | 492 | return $this->getAttributes("internal:anon_local_value")[0]['value']."@".$realm; |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | } |
| 643 | 643 | |
| 644 | 644 | $monthlyList = []; |
| 645 | - $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
| 645 | + $monthly = $this->frontendHandle->exec("SELECT downloads_user,device_id FROM downloads_history WHERE profile_id=? AND stat_date=DATE_FORMAT(NOW(),'%Y-%m-01')", "i", $this->identifier); |
|
| 646 | 646 | while ($statsQuery = mysqli_fetch_object(/** @scrutinizer ignore-type */ $monthly)) { |
| 647 | 647 | $monthlyList[$statsQuery->device_id] = $statsQuery->downloads_user; |
| 648 | 648 | } |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | } |
| 655 | 655 | |
| 656 | 656 | \core\common\Entity::intoThePotatoes(); |
| 657 | - ksort($finalarray, SORT_STRING|SORT_FLAG_CASE); |
|
| 657 | + ksort($finalarray, SORT_STRING | SORT_FLAG_CASE); |
|
| 658 | 658 | \core\common\Entity::outOfThePotatoes(); |
| 659 | 659 | return $finalarray; |
| 660 | 660 | } |
@@ -964,7 +964,7 @@ discard block |
||
| 964 | 964 | $profileStatus = self::CERT_STATUS_NONE; |
| 965 | 965 | foreach ($rows as $row) { |
| 966 | 966 | $encodedCert = $row[0]; |
| 967 | - $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t']- time(); |
|
| 967 | + $tm = $x509->processCertificate(base64_decode($encodedCert))['full_details']['validTo_time_t'] - time(); |
|
| 968 | 968 | if ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_critical']) { |
| 969 | 969 | $certStatus = self::CERT_STATUS_ERROR; |
| 970 | 970 | } elseif ($tm < \config\ConfAssistant::CERT_WARNINGS['expiry_warning']) { |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | ?> |
| 28 | 28 | <?php |
| 29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 30 | 30 | |
| 31 | 31 | $auth = new \web\lib\admin\Authentication(); |
| 32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | echo '<br/>'; |
| 83 | 83 | echo _("In the 'Timestamp' column we show last update time."); |
| 84 | 84 | echo '<p/>'; |
| 85 | - echo _('To check eduroam database specification see') . |
|
| 86 | - ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">' . |
|
| 87 | - _('this document') . '</a>.<p/>'; |
|
| 85 | + echo _('To check eduroam database specification see'). |
|
| 86 | + ' <a target="_blank" href="https://monitor.eduroam.org/eduroam-database/v2/docs/eduroam-database-ver30112021.pdf">'. |
|
| 87 | + _('this document').'</a>.<p/>'; |
|
| 88 | 88 | echo _('If you cannot find your institution on this list it means that this institiution is not present in your upstream data.'); |
| 89 | 89 | echo '<p/>'; |
| 90 | 90 | $allAuthorizedFeds = $user->getAttributes("user:fedadmin"); |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | ?> |
| 94 | 94 | |
| 95 | 95 | <select name="INST-list" id="INST-list"> |
| 96 | - <option value=""><?php echo _('---PLEASE CHOOSE---');?></option> |
|
| 96 | + <option value=""><?php echo _('---PLEASE CHOOSE---'); ?></option> |
|
| 97 | 97 | <?php |
| 98 | 98 | $instdata = array(); |
| 99 | 99 | foreach ($extInsts as $iid => $oneInst) { |
| 100 | - print '<option value="' . $iid . '">' . $oneInst['name'] . '</option>'; |
|
| 100 | + print '<option value="'.$iid.'">'.$oneInst['name'].'</option>'; |
|
| 101 | 101 | $instdata[$iid] = array(); |
| 102 | 102 | $instdata[$iid]['name'] = $oneInst['name']; |
| 103 | 103 | $instdata[$iid]['type'] = _('no data'); |
@@ -111,22 +111,22 @@ discard block |
||
| 111 | 111 | $contactdata = ''; |
| 112 | 112 | foreach ($oneInst['contacts'] as $oneContact) { |
| 113 | 113 | if ($contactdata != '') { |
| 114 | - $contactdata = $contactdata . '<br>'; |
|
| 114 | + $contactdata = $contactdata.'<br>'; |
|
| 115 | 115 | } |
| 116 | 116 | if ($oneContact['name']) { |
| 117 | - $contactdata = $contactdata . $oneContact['name']; |
|
| 117 | + $contactdata = $contactdata.$oneContact['name']; |
|
| 118 | 118 | } |
| 119 | 119 | if ($contactdata != '') { |
| 120 | - $contactdata = $contactdata . '<br>'; |
|
| 120 | + $contactdata = $contactdata.'<br>'; |
|
| 121 | 121 | } |
| 122 | 122 | if ($oneContact['mail']) { |
| 123 | - $contactdata = $contactdata . $oneContact['mail']; |
|
| 123 | + $contactdata = $contactdata.$oneContact['mail']; |
|
| 124 | 124 | } |
| 125 | 125 | if ($contactdata != '') { |
| 126 | - $contactdata = $contactdata . '<br>'; |
|
| 126 | + $contactdata = $contactdata.'<br>'; |
|
| 127 | 127 | } |
| 128 | 128 | if ($oneContact['phone']) { |
| 129 | - $contactdata = $contactdata . $oneContact['phone']; |
|
| 129 | + $contactdata = $contactdata.$oneContact['phone']; |
|
| 130 | 130 | } |
| 131 | 131 | } |
| 132 | 132 | if ($contactdata == '') { |
@@ -145,11 +145,11 @@ discard block |
||
| 145 | 145 | var instts = []; |
| 146 | 146 | <?php |
| 147 | 147 | foreach (array_keys($instdata) as $iid) { |
| 148 | - echo "instservers['" . $iid . "']='" . $instdata[$iid]['servers']. "';\n"; |
|
| 149 | - echo "instname['" . $iid . "']='" . $instdata[$iid]['name']. "';\n"; |
|
| 150 | - echo "insttype['" . $iid . "']='" . $instdata[$iid]['type']. "';\n"; |
|
| 151 | - echo "instcontact['" . $iid . "']='" . $instdata[$iid]['contacts']. "';\n"; |
|
| 152 | - echo "instts['" . $iid . "']='" . $instdata[$iid]['ts']. "';\n"; |
|
| 148 | + echo "instservers['".$iid."']='".$instdata[$iid]['servers']."';\n"; |
|
| 149 | + echo "instname['".$iid."']='".$instdata[$iid]['name']."';\n"; |
|
| 150 | + echo "insttype['".$iid."']='".$instdata[$iid]['type']."';\n"; |
|
| 151 | + echo "instcontact['".$iid."']='".$instdata[$iid]['contacts']."';\n"; |
|
| 152 | + echo "instts['".$iid."']='".$instdata[$iid]['ts']."';\n"; |
|
| 153 | 153 | } |
| 154 | 154 | ?> |
| 155 | 155 | $(document).ready(function(){ |
@@ -171,18 +171,18 @@ discard block |
||
| 171 | 171 | <div id="instdata_area"> |
| 172 | 172 | <table> |
| 173 | 173 | <tr><th align="left" width="350"> |
| 174 | - <?php echo _('Name');?> |
|
| 174 | + <?php echo _('Name'); ?> |
|
| 175 | 175 | </th><th align="left" width="100"> |
| 176 | - <?php echo _('Type');?> |
|
| 176 | + <?php echo _('Type'); ?> |
|
| 177 | 177 | </th> |
| 178 | 178 | <th align="left" width="200"> |
| 179 | - <?php echo _('Servers');?> |
|
| 179 | + <?php echo _('Servers'); ?> |
|
| 180 | 180 | </th> |
| 181 | 181 | <th align="left" width="200"> |
| 182 | - <?php echo _('Contact data');?> |
|
| 182 | + <?php echo _('Contact data'); ?> |
|
| 183 | 183 | </th> |
| 184 | 184 | <th align="left" width="100"> |
| 185 | - <?php echo _('Timestamp');?> |
|
| 185 | + <?php echo _('Timestamp'); ?> |
|
| 186 | 186 | </th> |
| 187 | 187 | </tr> |
| 188 | 188 | <tr id="toshow"></tr> |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | */ |
| 27 | 27 | ?> |
| 28 | 28 | <?php |
| 29 | -require_once dirname(dirname(dirname(__FILE__))) . "/config/_config.php"; |
|
| 29 | +require_once dirname(dirname(dirname(__FILE__)))."/config/_config.php"; |
|
| 30 | 30 | |
| 31 | 31 | $auth = new \web\lib\admin\Authentication(); |
| 32 | 32 | $deco = new \web\lib\admin\PageDecoration(); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | $feds = $user->getAttributes("user:fedadmin"); |
| 71 | 71 | foreach ($feds as $oneFed) { |
| 72 | 72 | $theFed = new \core\Federation($oneFed['value']); |
| 73 | - printf("<h2>" . _("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
| 73 | + printf("<h2>"._("Certificate Information for %s %s")."</h2>", $uiElements->nomenclatureFed, $theFed->name); |
|
| 74 | 74 | foreach ($theFed->listTlsCertificates() as $oneCert) { |
| 75 | 75 | if ($oneCert['STATUS'] == "REQUESTED") { |
| 76 | 76 | $theFed->updateCertificateStatus($oneCert['REQSERIAL']); |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | foreach ($theFed->listTlsCertificates() as $oneCert) { // fetch list a second time, in case we got a cert |
| 82 | 82 | $status = $oneCert['STATUS']; |
| 83 | 83 | echo "<tr>"; |
| 84 | - echo "<td>" . $oneCert['REQSERIAL'] . "</td><td>" . $oneCert['DN'] . "</td><td>" . $status . "</td><td>" . $oneCert['EXPIRY'] . "</td>"; |
|
| 84 | + echo "<td>".$oneCert['REQSERIAL']."</td><td>".$oneCert['DN']."</td><td>".$status."</td><td>".$oneCert['EXPIRY']."</td>"; |
|
| 85 | 85 | if ($status == "ISSUED") { |
| 86 | 86 | ?> |
| 87 | 87 | <td> |
| 88 | 88 | <form action='inc/showCert.inc.php' onsubmit='popupRedirectWindow(this); return false;' accept-charset='UTF-8' method="POST"> |
| 89 | - <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT'];?>"/> |
|
| 89 | + <input type="hidden" name="certdata" value="<?php echo $oneCert['CERT']; ?>"/> |
|
| 90 | 90 | <button type="submit">Display</button> |
| 91 | 91 | </form> |
| 92 | 92 | <td> |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | * <base_url>/copyright.php after deploying the software |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | -require_once dirname(dirname(dirname(__DIR__))) . "/config/_config.php"; |
|
| 23 | +require_once dirname(dirname(dirname(__DIR__)))."/config/_config.php"; |
|
| 24 | 24 | |
| 25 | 25 | $auth = new \web\lib\admin\Authentication(); |
| 26 | 26 | $auth->authenticate(); |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | $idp = $validator->existingIdP($_GET['inst_id']); |
| 103 | 103 | // editing IdPs is done from within the popup. When we're done, send the |
| 104 | 104 | // user back to the popup (append the result of the operation later) |
| 105 | - $redirectDestination = "manageAdmins.inc.php?inst_id=" . $idp->identifier . "&"; |
|
| 105 | + $redirectDestination = "manageAdmins.inc.php?inst_id=".$idp->identifier."&"; |
|
| 106 | 106 | if (count($validAddresses) == 0) { |
| 107 | - header("Location: $redirectDestination" . "invitation=INVALIDSYNTAX"); |
|
| 107 | + header("Location: $redirectDestination"."invitation=INVALIDSYNTAX"); |
|
| 108 | 108 | exit(1); |
| 109 | 109 | } |
| 110 | 110 | // is the user primary admin of this IdP? |
@@ -113,13 +113,13 @@ discard block |
||
| 113 | 113 | $fedadmin = $userObject->isFederationAdmin($idp->federation); |
| 114 | 114 | // check if he is either one, if not, complain |
| 115 | 115 | if (!$is_owner && !$fedadmin) { |
| 116 | - echo "<p>" . sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant) . "</p>"; |
|
| 116 | + echo "<p>".sprintf(_("Something's wrong... you are a %s admin, but not for the %s the requested %s belongs to!"), $uiElements->nomenclatureFed, $uiElements->nomenclatureFed, $uiElements->nomenclatureParticipant)."</p>"; |
|
| 117 | 117 | exit(1); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | $prettyprintname = $idp->name; |
| 121 | 121 | $newtokens = $mgmt->createTokens($fedadmin, $validAddresses, $idp); |
| 122 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP " . $idp->identifier . " - Token created for " . implode(",", $validAddresses)); |
|
| 122 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP ".$idp->identifier." - Token created for ".implode(",", $validAddresses)); |
|
| 123 | 123 | $introtext = "CO-ADMIN"; |
| 124 | 124 | $participant_type = $idp->type; |
| 125 | 125 | break; |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | $participant_type = $validator->partType($_POST['participant_type']); |
| 136 | 136 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($newcountry); |
| 137 | 137 | if ($new_idp_authorized_fedadmin !== TRUE) { |
| 138 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 138 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
| 139 | 139 | } |
| 140 | 140 | $federation = $validator->existingFederation($newcountry); |
| 141 | 141 | $prettyprintname = $newinstname; |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | // send the user back to his federation overview page, append the result of the operation later |
| 144 | 144 | // do the token creation magic |
| 145 | 145 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $newinstname, 0, $newcountry, $participant_type); |
| 146 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type " . implode(",", $validAddresses)); |
|
| 146 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "ORG FUTURE - Token created for $participant_type ".implode(",", $validAddresses)); |
|
| 147 | 147 | break; |
| 148 | 148 | case OPERATION_MODE_NEWFROMDB: |
| 149 | 149 | $redirectDestination = "../overview_federation.php?"; |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $extinfo = $catInstance->getExternalDBEntityDetails($newexternalid, strtoupper($fedId).'01'); |
| 158 | 158 | $new_idp_authorized_fedadmin = $userObject->isFederationAdmin($extinfo['country']); |
| 159 | 159 | if ($new_idp_authorized_fedadmin !== TRUE) { |
| 160 | - throw new Exception("Something's wrong... you want to create a new " . $uiElements->nomenclatureParticipant . ", but are not a " . $uiElements->nomenclatureFed . " admin for the " . $uiElements->nomenclatureFed . " it should be in!"); |
|
| 160 | + throw new Exception("Something's wrong... you want to create a new ".$uiElements->nomenclatureParticipant.", but are not a ".$uiElements->nomenclatureFed." admin for the ".$uiElements->nomenclatureFed." it should be in!"); |
|
| 161 | 161 | } |
| 162 | 162 | $federation = $validator->existingFederation($extinfo['country']); |
| 163 | 163 | $newcountry = $extinfo['country']; |
@@ -181,14 +181,14 @@ discard block |
||
| 181 | 181 | $introtext = "EXISTING-FED"; |
| 182 | 182 | // do the token creation magic |
| 183 | 183 | $newtokens = $mgmt->createTokens(TRUE, $validAddresses, $prettyprintname, $newexternalid, $fedId); |
| 184 | - $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for " . implode(",", $validAddresses)); |
|
| 184 | + $loggerInstance->writeAudit($_SESSION['user'], "NEW", "IdP FUTURE - Token created for ".implode(",", $validAddresses)); |
|
| 185 | 185 | break; |
| 186 | 186 | default: // includes OPERATION_MODE_INVALID |
| 187 | 187 | // second param is TRUE, so the variable *will* contain a string |
| 188 | 188 | // i.e. ignore Scrutinizer type warning later |
| 189 | 189 | $wrongcontent = print_r($_POST, TRUE); |
| 190 | 190 | echo "<pre>Wrong parameters in POST: |
| 191 | -" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent) . " |
|
| 191 | +" . htmlspecialchars(/** @scrutinizer ignore-type */ $wrongcontent)." |
|
| 192 | 192 | </pre>"; |
| 193 | 193 | exit(1); |
| 194 | 194 | } |
@@ -213,14 +213,14 @@ discard block |
||
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | if (count($status) == 0) { |
| 216 | - header("Location: $redirectDestination" . "invitation=FAILURE"); |
|
| 216 | + header("Location: $redirectDestination"."invitation=FAILURE"); |
|
| 217 | 217 | exit; |
| 218 | 218 | } |
| 219 | 219 | $finalDestParams = "invitation=SUCCESS"; |
| 220 | 220 | if (count($status) < count($totalSegments)) { // only a subset of mails was sent, update status |
| 221 | 221 | $finalDestParams = "invitation=PARTIAL"; |
| 222 | 222 | } |
| 223 | -$finalDestParams .= "&successcount=" . count($status); |
|
| 223 | +$finalDestParams .= "&successcount=".count($status); |
|
| 224 | 224 | if ($allEncrypted === TRUE) { |
| 225 | 225 | $finalDestParams .= "&transportsecurity=ENCRYPTED"; |
| 226 | 226 | } elseif ($allClear === TRUE) { |
@@ -229,4 +229,4 @@ discard block |
||
| 229 | 229 | $finalDestParams .= "&transportsecurity=PARTIAL"; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | -header("Location: $redirectDestination" . $finalDestParams); |
|
| 232 | +header("Location: $redirectDestination".$finalDestParams); |
|
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | ?> |
| 22 | 22 | <?php |
| 23 | -require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/config/_config.php"; |
|
| 23 | +require_once dirname(dirname(dirname(dirname(__FILE__))))."/config/_config.php"; |
|
| 24 | 24 | |
| 25 | 25 | $auth = new \web\lib\admin\Authentication(); |
| 26 | 26 | $auth->authenticate(); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | // if we have a pushed close button, submit attributes and send user back to the overview page |
| 37 | 37 | // if external DB sync is disabled globally, the user never gets to this page. If he came here *anyway* -> send him back immediately. |
| 38 | -if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE ) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
| 38 | +if ((isset($_POST['submitbutton']) && $_POST['submitbutton'] == web\lib\common\FormElements::BUTTON_CLOSE) || \config\Master::DB['enforce-external-sync'] == FALSE) { |
|
| 39 | 39 | header("Location: ../overview_federation.php"); |
| 40 | 40 | exit; |
| 41 | 41 | } |
@@ -92,9 +92,9 @@ discard block |
||
| 92 | 92 | $cat = new \core\CAT(); |
| 93 | 93 | switch ($my_inst->getExternalDBSyncState()) { |
| 94 | 94 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_SYNCED: |
| 95 | - printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
| 96 | - echo "<p>" . sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name']) . "</p>"; |
|
| 97 | - echo "<table><tr><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname']) . "</td><td>" . sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name']) . "</td></tr>"; |
|
| 95 | + printf(_("This %s is linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
| 96 | + echo "<p>".sprintf(_("The following information about the IdP is stored in the %s DB and %s DB:"), \config\Master::APPEARANCE['productname'], \config\ConfAssistant::CONSORTIUM['display_name'])."</p>"; |
|
| 97 | + echo "<table><tr><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\Master::APPEARANCE['productname'])."</td><td>".sprintf(_("Information in <strong>%s Database</strong>"), \config\ConfAssistant::CONSORTIUM['display_name'])."</td></tr>"; |
|
| 98 | 98 | echo "<tr><td>"; |
| 99 | 99 | // left-hand side: CAT DB |
| 100 | 100 | echo "<table>"; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | } else { |
| 107 | 107 | $language = \config\Master::LANGUAGES[$name['lang']]['display'] ?? "(unsupported language)"; |
| 108 | 108 | } |
| 109 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language) . "</td><td>" . $name['value'] . "</td></tr>"; |
|
| 109 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $language)."</td><td>".$name['value']."</td></tr>"; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | $admins = $my_inst->listOwners(); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | if (count($username) == 0) { |
| 118 | 118 | $username[0]['value'] = _("Unnamed User"); |
| 119 | 119 | } |
| 120 | - echo "<tr><td>" . _("Administrator [invited as]") . "</td><td>" . $username[0]['value'] . " [" . $admin['MAIL'] . "]</td></tr>"; |
|
| 120 | + echo "<tr><td>"._("Administrator [invited as]")."</td><td>".$username[0]['value']." [".$admin['MAIL']."]</td></tr>"; |
|
| 121 | 121 | } |
| 122 | 122 | echo "</table>"; |
| 123 | 123 | // end of left-hand side |
@@ -127,38 +127,38 @@ discard block |
||
| 127 | 127 | $externalid = $extIdObject->external_db_id; |
| 128 | 128 | $ROid = $extIdObject->ROid; |
| 129 | 129 | if (is_bool($extIdObject)) { // we are in SYNCED state so this cannot happen |
| 130 | - throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the " . $uiElements->nomenclatureParticipant . "!"); |
|
| 130 | + throw new Exception("We are in SYNCSTATE_SYNCED but still there is no external DB Id available for the ".$uiElements->nomenclatureParticipant."!"); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | $extinfo = $cat->getExternalDBEntityDetails($externalid, $ROid); |
| 134 | 134 | |
| 135 | 135 | echo "<table>"; |
| 136 | 136 | foreach ($extinfo['names'] as $lang => $name) { |
| 137 | - echo "<tr><td>" . sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang) . "</td><td>$name</td>"; |
|
| 137 | + echo "<tr><td>".sprintf(_("%s Name (%s)"), $uiElements->nomenclatureParticipant, $lang)."</td><td>$name</td>"; |
|
| 138 | 138 | } |
| 139 | 139 | foreach ($extinfo['admins'] as $number => $admin_details) { |
| 140 | - echo "<tr><td>" . _("Administrator email") . "</td><td>" . $admin_details['email'] . "</td></tr>"; |
|
| 140 | + echo "<tr><td>"._("Administrator email")."</td><td>".$admin_details['email']."</td></tr>"; |
|
| 141 | 141 | } |
| 142 | 142 | echo "</table>"; |
| 143 | 143 | // end of right-hand side |
| 144 | 144 | echo "</td></tr></table>"; |
| 145 | - echo "<p>" . _("If this mapping is not correct any more, you can remove the link:") . " "; |
|
| 145 | + echo "<p>"._("If this mapping is not correct any more, you can remove the link:")." "; |
|
| 146 | 146 | echo "<form name='form-unlink-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
| 147 | - echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_DELETE . "'>" . _("Unlink") . "</button></form>"; |
|
| 147 | + echo "<button type='submit' class='delete' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_DELETE."'>"._("Unlink")."</button></form>"; |
|
| 148 | 148 | break; |
| 149 | 149 | case \core\IdP::EXTERNAL_DB_SYNCSTATE_NOT_SYNCED: |
| 150 | 150 | $temparray = []; |
| 151 | - printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name']) . " "; |
|
| 152 | - echo "<strong>" . _("This means that its profiles are not made available on the user download page.") . "</strong> "; |
|
| 151 | + printf(_("This %s is not yet linked to the %s database."), $uiElements->nomenclatureParticipant, \config\ConfAssistant::CONSORTIUM['display_name'])." "; |
|
| 152 | + echo "<strong>"._("This means that its profiles are not made available on the user download page.")."</strong> "; |
|
| 153 | 153 | printf(_("You can link it to the %s database below."), \config\ConfAssistant::CONSORTIUM['display_name']); |
| 154 | 154 | $candidates = $my_inst->getExternalDBSyncCandidates($my_inst->type); |
| 155 | 155 | echo "<br/><form name='form-link-inst' action='inc/manageDBLink.inc.php?inst_id=$my_inst->identifier' method='post' accept-charset='UTF-8'>"; |
| 156 | - printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant) . " "; |
|
| 156 | + printf(_("Please select an entity from the %s DB which corresponds to this CAT %s."), \config\ConfAssistant::CONSORTIUM['display_name'], $uiElements->nomenclatureParticipant)." "; |
|
| 157 | 157 | if (count($candidates) > 0) { |
| 158 | 158 | printf(_("Particularly promising entries (names in CAT and %s DB are a 100%% match) are on top of the list."), \config\ConfAssistant::CONSORTIUM['display_name']); |
| 159 | 159 | } |
| 160 | 160 | echo "<table>"; |
| 161 | - echo "<tr><th>" . _("Link to this entity?") . "</th><th>" . sprintf(_("%s Name"), $uiElements->nomenclatureParticipant) . "</th><th>" . _("Administrators") . "</th></tr>"; |
|
| 161 | + echo "<tr><th>"._("Link to this entity?")."</th><th>".sprintf(_("%s Name"), $uiElements->nomenclatureParticipant)."</th><th>"._("Administrators")."</th></tr>"; |
|
| 162 | 162 | |
| 163 | 163 | foreach ($candidates as $candidate) { |
| 164 | 164 | $info = $cat->getExternalDBEntityDetails($candidate, strtoupper($my_inst->federation).'01'); |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | echo "</td><td>"; |
| 170 | 170 | foreach ($info['admins'] as $number => $admin_details) { |
| 171 | - echo "[E-Mail] " . $admin_details['email'] . "<br/>"; |
|
| 171 | + echo "[E-Mail] ".$admin_details['email']."<br/>"; |
|
| 172 | 172 | } |
| 173 | 173 | echo "</td></tr>"; |
| 174 | 174 | $temparray[] = $candidate; |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $buffer = ""; |
| 181 | 181 | |
| 182 | 182 | foreach ($unmappedentities as $v) { |
| 183 | - $buffer .= "<option value='" . $v['ID'] . "'>[ID " . $v['ID'] . "] " . $v['name'] . "</option>"; |
|
| 183 | + $buffer .= "<option value='".$v['ID']."'>[ID ".$v['ID']."] ".$v['name']."</option>"; |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | if ($buffer != "") { |
@@ -191,9 +191,9 @@ discard block |
||
| 191 | 191 | } |
| 192 | 192 | // issue a big red warning if there are no link candidates at all in the federation |
| 193 | 193 | if (empty($buffer) && empty($candidates)) { |
| 194 | - echo "<tr><td style='color:#ff0000' colspan='2'>" . sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed) . "</td></tr>"; |
|
| 194 | + echo "<tr><td style='color:#ff0000' colspan='2'>".sprintf(_('There is no single unmapped %s in the external database for this %s!'), $uiElements->nomenclatureParticipant, $uiElements->nomenclatureFed)."</td></tr>"; |
|
| 195 | 195 | } |
| 196 | - echo "</table><button type='submit' name='submitbutton' id='submit' value='" . web\lib\common\FormElements::BUTTON_SAVE . "' disabled >" . _("Create Link") . "</button></form>"; |
|
| 196 | + echo "</table><button type='submit' name='submitbutton' id='submit' value='".web\lib\common\FormElements::BUTTON_SAVE."' disabled >"._("Create Link")."</button></form>"; |
|
| 197 | 197 | break; |
| 198 | 198 | default: |
| 199 | 199 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 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 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | $postFed = $fedIdentifiers[$correctIndex]; |
| 98 | 98 | $temp = new \core\Federation($postFed); |
| 99 | 99 | if ($owner === NULL) { |
| 100 | - return [$temp,'readonly']; |
|
| 100 | + return [$temp, 'readonly']; |
|
| 101 | 101 | } |
| 102 | 102 | $user = new \core\User($owner); |
| 103 | 103 | foreach ($temp->listFederationAdmins() as $oneowner) { |
@@ -105,9 +105,9 @@ discard block |
||
| 105 | 105 | return [$temp, 'fullaccess']; |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | - if ($user->isSuperadmin()|| $user->isSupport()) { |
|
| 108 | + if ($user->isSuperadmin() || $user->isSupport()) { |
|
| 109 | 109 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
| 110 | - return [$temp,'readonly']; |
|
| 110 | + return [$temp, 'readonly']; |
|
| 111 | 111 | } |
| 112 | 112 | throw new Exception($this->inputValidationError(sprintf("User is not %s administrator!", \core\common\Entity::$nomenclature_fed))); |
| 113 | 113 | } |
@@ -168,18 +168,18 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | if ($user->isFederationAdmin($temp->federation)) { |
| 170 | 170 | $this->loggerInstance->debug(4, "You are fed admin for this IdP\n"); |
| 171 | - return [$temp,'readonly']; |
|
| 171 | + return [$temp, 'readonly']; |
|
| 172 | 172 | } |
| 173 | 173 | if ($user->isSuperadmin() || $user->isSupport()) { |
| 174 | 174 | $this->loggerInstance->debug(4, "You are the superadmin/support\n"); |
| 175 | - return [$temp,'readonly']; |
|
| 175 | + return [$temp, 'readonly']; |
|
| 176 | 176 | } |
| 177 | 177 | throw new Exception($this->inputValidationError("This IdP identifier is not accessible!")); |
| 178 | 178 | } |
| 179 | 179 | if ($claimedFedBinding !== NULL && strtoupper($temp->federation) != strtoupper($claimedFedBinding->tld)) { |
| 180 | 180 | throw new Exception($this->inputValidationError("This IdP does not belong to the claimed federation!")); |
| 181 | 181 | } |
| 182 | - return [$temp,'nouser']; |
|
| 182 | + return [$temp, 'nouser']; |
|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /** |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * @throws Exception |
| 258 | 258 | */ |
| 259 | 259 | public function existingExtInstitution($extId, $userEmail = NULL, $ROid = NULL) { |
| 260 | - if ($ROid === NULL || !preg_match('/^[A-Z][A-Z]01$/', $ROid) ) { |
|
| 260 | + if ($ROid === NULL || !preg_match('/^[A-Z][A-Z]01$/', $ROid)) { |
|
| 261 | 261 | throw new Exception("$ROid: No correct federation identifier profided"); |
| 262 | 262 | } |
| 263 | 263 | if ($userEmail === NULL) { |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | try { |
| 646 | 646 | $image->readImageBlob($binary); |
| 647 | 647 | } catch (\ImagickException $exception) { |
| 648 | - echo "Error" . $exception->getMessage(); |
|
| 648 | + echo "Error".$exception->getMessage(); |
|
| 649 | 649 | return FALSE; |
| 650 | 650 | } |
| 651 | 651 | // image survived the sanity check |
@@ -47,9 +47,9 @@ discard block |
||
| 47 | 47 | $Gui->loggerInstance->debug(4, $operatingSystem); |
| 48 | 48 | $uiElements = new web\lib\admin\UIElements(); |
| 49 | 49 | if ($operatingSystem) { |
| 50 | - print "recognisedOS = '" . $operatingSystem['device'] . "';\n"; |
|
| 50 | + print "recognisedOS = '".$operatingSystem['device']."';\n"; |
|
| 51 | 51 | } |
| 52 | -require dirname(__DIR__) . '/user/js/cat_js.php'; |
|
| 52 | +require dirname(__DIR__).'/user/js/cat_js.php'; |
|
| 53 | 53 | $cssUrl = $Gui->skinObject->findResourceUrl("CSS", "cat-user.css.php"); |
| 54 | 54 | ?> |
| 55 | 55 | </script> |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | <?php |
| 64 | 64 | echo $divs->divHeading($visibility); |
| 65 | 65 | $Gui->languageInstance->setTextDomain("diagnostics"); |
| 66 | -require dirname(__DIR__) . '/diag/js/diag_js.php'; |
|
| 66 | +require dirname(__DIR__).'/diag/js/diag_js.php'; |
|
| 67 | 67 | ?> |
| 68 | 68 | <div id="main_page"> |
| 69 | 69 | <div id="loading_ico"> |
@@ -79,12 +79,12 @@ discard block |
||
| 79 | 79 | </div> |
| 80 | 80 | <div id="main_body"> |
| 81 | 81 | <div id="user_page"> |
| 82 | - <?php echo $divs->divPagetitle(_("Diagnostics site") . " (<span style='color:red'>beta</span>)", ""); ?> |
|
| 82 | + <?php echo $divs->divPagetitle(_("Diagnostics site")." (<span style='color:red'>beta</span>)", ""); ?> |
|
| 83 | 83 | <div id="user_info" style='padding-top: 10px;'> |
| 84 | 84 | <div id='diagnostic_choice'> |
| 85 | - <?php echo _("The diagnostics system will do its best to identify and resolve your problems!") . ' ' . _("Please help the system by answering the questions as precisely as possible.") . "<br/>" . _("Are you a") . ' '; ?> |
|
| 86 | - <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user") . ' ' . _("or"); ?> |
|
| 87 | - <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator") .'?'; ?> |
|
| 85 | + <?php echo _("The diagnostics system will do its best to identify and resolve your problems!").' '._("Please help the system by answering the questions as precisely as possible.")."<br/>"._("Are you a").' '; ?> |
|
| 86 | + <input type='radio' name='diagnostic_usertype' value='0'><?php echo _("end-user").' '._("or"); ?> |
|
| 87 | + <input type='radio' name='diagnostic_usertype' value='1' <?php if ($admin == 1) { echo " checked"; } ?> > <?php echo _("eduroam administrator").'?'; ?> |
|
| 88 | 88 | </div> |
| 89 | 89 | <div id='diagnostic_enduser' style='display: none;'> |
| 90 | 90 | <h2><?php echo _("Tools for End Users"); ?></h2> |
@@ -94,24 +94,24 @@ discard block |
||
| 94 | 94 | ?> |
| 95 | 95 | </p> |
| 96 | 96 | <?php |
| 97 | - echo '<div id="before_stage_1"><h3>' . _("The system needs some information on your home institution - issuer of your account") . '</h3>'; |
|
| 97 | + echo '<div id="before_stage_1"><h3>'._("The system needs some information on your home institution - issuer of your account").'</h3>'; |
|
| 98 | 98 | echo _("What is the realm part of your user account (the part behind the @ of 'your.username@<strong>realm.tld</strong>'):"); |
| 99 | 99 | ?> |
| 100 | 100 | <input type='text' name='user_realm' id='user_realm' value=''> |
| 101 | 101 | <?php |
| 102 | - echo '<div id="realm_by_select"><br/>' . _("alternatively") . '<br/>'; |
|
| 103 | - echo _("You can select your home institution from the following list") . '<br/>'; |
|
| 102 | + echo '<div id="realm_by_select"><br/>'._("alternatively").'<br/>'; |
|
| 103 | + echo _("You can select your home institution from the following list").'<br/>'; |
|
| 104 | 104 | echo '<div id="select_idp_country"><a href="" id="idp_countries_list">'; |
| 105 | - echo '<span id="realmselect">' . _("Click to select your country/region and organisation") . '</span></a></div>'; |
|
| 105 | + echo '<span id="realmselect">'._("Click to select your country/region and organisation").'</span></a></div>'; |
|
| 106 | 106 | ?> |
| 107 | 107 | <div id="select_idp_area" style="display:none;"> |
| 108 | 108 | </div> |
| 109 | 109 | </div> |
| 110 | 110 | <div id="position_info"> |
| 111 | 111 | <?php |
| 112 | - echo '<h3>' . _("Optionally, to improve tests, you can provide information on your current location") . '</h3>'; |
|
| 112 | + echo '<h3>'._("Optionally, to improve tests, you can provide information on your current location").'</h3>'; |
|
| 113 | 113 | echo '<div id="select_sp_country"><a href="" id="sp_countries_list">'; |
| 114 | - echo '<span id="spselect">' . _("Click to select a location in which you have an eduroam problem") . '</span></a></div>'; |
|
| 114 | + echo '<span id="spselect">'._("Click to select a location in which you have an eduroam problem").'</span></a></div>'; |
|
| 115 | 115 | ?> |
| 116 | 116 | <div id="select_sp_area" style="display:none;"> |
| 117 | 117 | </div> |
@@ -144,11 +144,11 @@ discard block |
||
| 144 | 144 | echo 'none'; |
| 145 | 145 | } |
| 146 | 146 | echo ";'>"; |
| 147 | - echo '<h3>' . _("What is the nature of the problem?") . '</h3>'; |
|
| 148 | - echo '<input type="radio" name="problem_type" value="0"' . (($sp==1)? ' checked' : '') . '>'; |
|
| 149 | - echo _("I suspect a technical problem at a particular IdP") . '<br>'; |
|
| 147 | + echo '<h3>'._("What is the nature of the problem?").'</h3>'; |
|
| 148 | + echo '<input type="radio" name="problem_type" value="0"'.(($sp == 1) ? ' checked' : '').'>'; |
|
| 149 | + echo _("I suspect a technical problem at a particular IdP").'<br>'; |
|
| 150 | 150 | echo '<input type="radio" name="problem_type" value="1">'; |
| 151 | - echo _("I want to report abuse of network resources by a roaming user") . '<br>'; |
|
| 151 | + echo _("I want to report abuse of network resources by a roaming user").'<br>'; |
|
| 152 | 152 | echo '<input type="radio" name="problem_type" value="2">'; |
| 153 | 153 | echo _("I suspect a technical problem for one of my users at a particular SP"); |
| 154 | 154 | echo "<div id='idp_contact_area'></div>"; |
@@ -157,9 +157,9 @@ discard block |
||
| 157 | 157 | echo "</div>"; |
| 158 | 158 | } else { |
| 159 | 159 | echo "0\">"; |
| 160 | - echo _("This service is for authenticated admins only.") . '<br>'; |
|
| 161 | - echo "<a href=\"diag.php?admin=1\">" . |
|
| 162 | - _("eduroam® admin access is needed") . "</a>"; |
|
| 160 | + echo _("This service is for authenticated admins only.").'<br>'; |
|
| 161 | + echo "<a href=\"diag.php?admin=1\">". |
|
| 162 | + _("eduroam® admin access is needed")."</a>"; |
|
| 163 | 163 | } |
| 164 | 164 | ?> |
| 165 | 165 | <div id="realm_problem"> |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | return false; |
| 238 | 238 | }); |
| 239 | 239 | $(document).on('change', '#idp_country' , function() { |
| 240 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
| 240 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
| 241 | 241 | var id = $(this).attr('id'); |
| 242 | 242 | var k = id.indexOf('_'); |
| 243 | 243 | var type = id.substr(0,k); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | var shtml = ''; |
| 256 | 256 | var select = ''; |
| 257 | 257 | if (type !== 'asp') { |
| 258 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
| 258 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
| 259 | 259 | } |
| 260 | 260 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
| 261 | 261 | for (var i in institutions) { |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | } else { |
| 277 | 277 | if (data.status === 0) { |
| 278 | 278 | inProgress(0); |
| 279 | - var msg = <?php echo '"' . _("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.") . '"'; ?>; |
|
| 279 | + var msg = <?php echo '"'._("The database does not contain the information needed to help you in realm selection for this country. You have to provide the realm you are interested in.").'"'; ?>; |
|
| 280 | 280 | alert(msg); |
| 281 | 281 | $('#select_idp_country').show(); |
| 282 | 282 | $('#select_idp_area').hide(); |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | }, |
| 286 | 286 | error:function() { |
| 287 | 287 | inProgress(0); |
| 288 | - var msg = <?php echo '"' . _("Can not search in database. You have to provide the realm you are interested in.") . '"'; ?>; |
|
| 288 | + var msg = <?php echo '"'._("Can not search in database. You have to provide the realm you are interested in.").'"'; ?>; |
|
| 289 | 289 | alert(msg); |
| 290 | 290 | $('#select_idp_country').show(); |
| 291 | 291 | $('#select_idp_area').hide(); |
@@ -301,9 +301,9 @@ discard block |
||
| 301 | 301 | }); |
| 302 | 302 | $(document).on('change', '#select_sp_problem' , function() { |
| 303 | 303 | if ($('#select_sp_problem').val().substr(0,6) == 'abuse-') { |
| 304 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check if this realm is registered") . '"'; ?>); |
|
| 304 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check if this realm is registered").'"'; ?>); |
|
| 305 | 305 | } else { |
| 306 | - $('#realm_in_db_admin').text(<?php echo '"' . _("Check this realm") . '"'; ?>); |
|
| 306 | + $('#realm_in_db_admin').text(<?php echo '"'._("Check this realm").'"'; ?>); |
|
| 307 | 307 | } |
| 308 | 308 | $('#realm_in_db_admin').hide(); |
| 309 | 309 | $('#admin_realm').val(''); |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | clear_sp_question(); |
| 312 | 312 | }); |
| 313 | 313 | $(document).on('change', '#sp_country, #asp_country' , function() { |
| 314 | - var comment = <?php echo '"' . _("Fetching institutions list") . '..."'; ?>; |
|
| 314 | + var comment = <?php echo '"'._("Fetching institutions list").'..."'; ?>; |
|
| 315 | 315 | var id = $(this).attr('id'); |
| 316 | 316 | var k = id.indexOf('_'); |
| 317 | 317 | var type = id.substr(0,k); |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | var shtml = ''; |
| 330 | 330 | var select = ''; |
| 331 | 331 | if (type !== 'asp') { |
| 332 | - shtml = <?php echo '"<td>' . _("Select institution:") . '</td><td>"'; ?>; |
|
| 332 | + shtml = <?php echo '"<td>'._("Select institution:").'</td><td>"'; ?>; |
|
| 333 | 333 | } |
| 334 | 334 | select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value=""></option>'; |
| 335 | 335 | for (var i in hotspots) { |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | inProgress(0); |
| 353 | 353 | var select = '<select id="' + type + '_inst" name="' + type + '_inst" style="margin-left:0px; width:400px;"><option value="">'; |
| 354 | 354 | var shtml = '<td></td><td>'; |
| 355 | - select = select + <?php echo '"' . _("Other location") . '"'; ?> + '</option></select></td>'; |
|
| 355 | + select = select + <?php echo '"'._("Other location").'"'; ?> + '</option></select></td>'; |
|
| 356 | 356 | if (type !== 'asp') { |
| 357 | 357 | $('#row_' + type + '_institution').html(''); |
| 358 | 358 | $('#row_' + type + '_institution').append(shtml + select); |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | $('#start_test_area').hide(); |
| 387 | 387 | return false; |
| 388 | 388 | } |
| 389 | - var comment = <?php echo '"' . _("Fetching realms list") . '..."'; ?>; |
|
| 389 | + var comment = <?php echo '"'._("Fetching realms list").'..."'; ?>; |
|
| 390 | 390 | inProgress(1, comment); |
| 391 | 391 | co = $("#idp_country option:selected").val(); |
| 392 | 392 | $.ajax({ |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | var realms = data.realms; |
| 400 | 400 | var realmselect = ''; |
| 401 | 401 | if (realms.length > 1) { |
| 402 | - realmselect = <?php echo '"<td>' . _("Check realm(s):") . '</td>"'; ?>; |
|
| 402 | + realmselect = <?php echo '"<td>'._("Check realm(s):").'</td>"'; ?>; |
|
| 403 | 403 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
| 404 | 404 | for (var i in realms) { |
| 405 | 405 | realmselect = realmselect + '<input type="radio" name="realm" '; |
@@ -411,7 +411,7 @@ discard block |
||
| 411 | 411 | } |
| 412 | 412 | realmselect = realmselect + '</span></td>'; |
| 413 | 413 | } else { |
| 414 | - realmselect = <?php echo '"<td>' . _("Realm:") . '</td>"'; ?>; |
|
| 414 | + realmselect = <?php echo '"<td>'._("Realm:").'</td>"'; ?>; |
|
| 415 | 415 | realmselect = realmselect + '<td>' + "<span style='margin-left: 10px'>"; |
| 416 | 416 | realmselect = realmselect + realms[0] + '</span>'; |
| 417 | 417 | realmselect = realmselect + '<input type="hidden" name="realm" value="' + realms[0] + '">'; |
@@ -469,7 +469,7 @@ discard block |
||
| 469 | 469 | clear_sp_question(); |
| 470 | 470 | t = 1; |
| 471 | 471 | } |
| 472 | - var comment = <?php echo '"' . _("Running realm tests") . '..."'; ?>; |
|
| 472 | + var comment = <?php echo '"'._("Running realm tests").'..."'; ?>; |
|
| 473 | 473 | inProgress(1, comment); |
| 474 | 474 | /*waiting(comment);*/ |
| 475 | 475 | $.ajax({ |
@@ -531,7 +531,7 @@ discard block |
||
| 531 | 531 | testSociopath('', answer); |
| 532 | 532 | }); |
| 533 | 533 | $('#realmtest').click(function(event){ |
| 534 | - var comment = <?php echo '"<br><br>' . _("Running realm tests") . '..."'; ?>; |
|
| 534 | + var comment = <?php echo '"<br><br>'._("Running realm tests").'..."'; ?>; |
|
| 535 | 535 | inProgress(1, comment); |
| 536 | 536 | $('#start_test_area').hide(); |
| 537 | 537 | if ($('#select_sp_area').is(':hidden')) { |
@@ -579,13 +579,13 @@ discard block |
||
| 579 | 579 | reset_footer(); |
| 580 | 580 | testSociopath(realm, 0); |
| 581 | 581 | } else { |
| 582 | - var title = <?php echo '"' . _("Diagnostics results for selected realms") . '"'; ?>; |
|
| 583 | - result = '<div class="padding"><h3>' + <?php echo '"' . _("An unknown problem occurred") . '"'; ?>; |
|
| 582 | + var title = <?php echo '"'._("Diagnostics results for selected realms").'"'; ?>; |
|
| 583 | + result = '<div class="padding"><h3>' + <?php echo '"'._("An unknown problem occurred").'"'; ?>; |
|
| 584 | 584 | result = result + '</h3>' |
| 585 | 585 | if (r.length == 1) { |
| 586 | - result = result + <?php echo '"' . _("This test includes checking of the following realm") . '"'; ?>; |
|
| 586 | + result = result + <?php echo '"'._("This test includes checking of the following realm").'"'; ?>; |
|
| 587 | 587 | } else { |
| 588 | - result = result + <?php echo '"' . _("This test includes checking of the following realms") . '"'; ?>; |
|
| 588 | + result = result + <?php echo '"'._("This test includes checking of the following realms").'"'; ?>; |
|
| 589 | 589 | } |
| 590 | 590 | result = result + ': ' |
| 591 | 591 | for (var i=0; i < r.length; i++) { |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | result = result + r[i]; |
| 596 | 596 | } |
| 597 | 597 | result = result + '.<br>'; |
| 598 | - result = result + <?php echo '"' . _("You should report this to") . '"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
| 598 | + result = result + <?php echo '"'._("You should report this to").'"'; ?> + ' <a href="mailto:[email protected]">[email protected]</a>'; |
|
| 599 | 599 | result = result + '</div>'; |
| 600 | 600 | $('#after_stage_1').hide(); |
| 601 | 601 | $('#before_stage_1').show(); |
@@ -663,43 +663,43 @@ discard block |
||
| 663 | 663 | success:function(data) { |
| 664 | 664 | if (data.status === 1) { |
| 665 | 665 | var result = ''; |
| 666 | - var title = <?php echo '"' . _("eduroam admin report submission") . '"'; ?>; |
|
| 666 | + var title = <?php echo '"'._("eduroam admin report submission").'"'; ?>; |
|
| 667 | 667 | result = '<div class="padding">'; |
| 668 | 668 | if (type == 'idp_send') { |
| 669 | - result = result + '<h3>'+ <?php echo '"' . _("SP contacting IdP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
| 669 | + result = result + '<h3>'+ <?php echo '"'._("SP contacting IdP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
| 670 | 670 | result = result + '<table>'; |
| 671 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
| 672 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
| 673 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
| 674 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
| 675 | - result = result + '<tr><td>' + <?php echo '"' . _("An email to contact the reporter") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
| 676 | - result = result + '<tr><td>' + <?php echo '"' . _("Test result") . '" '; ?> +'</td><td>'; |
|
| 671 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
| 672 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
| 673 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
| 674 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
| 675 | + result = result + '<tr><td>' + <?php echo '"'._("An email to contact the reporter").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
| 676 | + result = result + '<tr><td>' + <?php echo '"'._("Test result").'" '; ?> +'</td><td>'; |
|
| 677 | 677 | if (data.tests_result == 1) { |
| 678 | - result = result + <?php echo '"' . _("failure") . '"'; ?>; |
|
| 678 | + result = result + <?php echo '"'._("failure").'"'; ?>; |
|
| 679 | 679 | } else { |
| 680 | - result = result + <?php echo '"' . _("success") . '"'; ?>; |
|
| 680 | + result = result + <?php echo '"'._("success").'"'; ?>; |
|
| 681 | 681 | } |
| 682 | 682 | result = result + '</td></tr>'; |
| 683 | - result = result + '<tr><td>' + <?php echo '"' . _("Test URL") . '" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
| 684 | - result = result + '<tr><td>' + <?php echo '"' . _("Email to IdP administrators ") . '"'; ?> + ' '; |
|
| 683 | + result = result + '<tr><td>' + <?php echo '"'._("Test URL").'" '; ?> +'</td><td><a href="' + data.testurl + '">' + data.testurl + '</a></td></tr>'; |
|
| 684 | + result = result + '<tr><td>' + <?php echo '"'._("Email to IdP administrators ").'"'; ?> + ' '; |
|
| 685 | 685 | if (data.emailsent == 1) { |
| 686 | - result = result + <?php echo '"' . _("send successfully") . '"'; ?>; |
|
| 686 | + result = result + <?php echo '"'._("send successfully").'"'; ?>; |
|
| 687 | 687 | } else { |
| 688 | - result = result + <?php echo '"' . _("not sent - failure while sending") . '"'; ?>; |
|
| 688 | + result = result + <?php echo '"'._("not sent - failure while sending").'"'; ?>; |
|
| 689 | 689 | } |
| 690 | 690 | result = result + '</td><td></td></tr>'; |
| 691 | 691 | } |
| 692 | 692 | if (type == 'sp_send') { |
| 693 | - result = result + '<h3>'+ <?php echo '"' . _("IdP contacting SP due to technical problems or abuse") . '"'; ?> + '</h3>'; |
|
| 693 | + result = result + '<h3>'+ <?php echo '"'._("IdP contacting SP due to technical problems or abuse").'"'; ?> + '</h3>'; |
|
| 694 | 694 | result = result + '<table>'; |
| 695 | - result = result + '<tr><td>' + <?php echo '"' . _("Reason") . '"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
| 696 | - result = result + '<tr><td>' + <?php echo '"' . _("SP's Operator-Name") . '"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
| 697 | - result = result + '<tr><td>' + <?php echo '"' . _("User's outer ID") . '"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
| 698 | - result = result + '<tr><td>' + <?php echo '"' . _("IdP email") . '"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
| 699 | - result = result + '<tr><td>' + <?php echo '"' . _("Event's timestamp") . '"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
| 700 | - result = result + '<tr><td>' + <?php echo '"' . _("Calling-Station-Id") . '"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
| 701 | - result = result + '<tr><td>' + <?php echo '"' . _("Additional description") . '"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
| 702 | - result = result + '<tr><td>' + <?php echo '"' . _("How to contact the user") . '"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
| 695 | + result = result + '<tr><td>' + <?php echo '"'._("Reason").'"'; ?> + '</td><td>' + data.reason + '</td></tr>'; |
|
| 696 | + result = result + '<tr><td>' + <?php echo '"'._("SP's Operator-Name").'"'; ?> + '</td><td>' + data.opname + '</td></tr>'; |
|
| 697 | + result = result + '<tr><td>' + <?php echo '"'._("User's outer ID").'"'; ?> + '</td><td>' + data.outerid + '</td></tr>'; |
|
| 698 | + result = result + '<tr><td>' + <?php echo '"'._("IdP email").'"'; ?> + '</td><td>' + data.email + '</td></tr>'; |
|
| 699 | + result = result + '<tr><td>' + <?php echo '"'._("Event's timestamp").'"'; ?> + '</td><td>' + data.timestamp + '</td></tr>'; |
|
| 700 | + result = result + '<tr><td>' + <?php echo '"'._("Calling-Station-Id").'"'; ?> + '</td><td>' + data.mac + '</td></tr>'; |
|
| 701 | + result = result + '<tr><td>' + <?php echo '"'._("Additional description").'"'; ?> +'</td><td>' + data.freetext + '</td></tr>'; |
|
| 702 | + result = result + '<tr><td>' + <?php echo '"'._("How to contact the user").'"'; ?> +'</td><td>' + data.cdetails + '</td></tr>'; |
|
| 703 | 703 | } |
| 704 | 704 | result = result + '</div>'; |
| 705 | 705 | showInfo(result, title); |
@@ -730,7 +730,7 @@ discard block |
||
| 730 | 730 | $(this).removeClass('visible_row').addClass('hidden_row'); |
| 731 | 731 | } |
| 732 | 732 | }); |
| 733 | - $('#admin_realm').attr('title', <?php echo '"' . _("Wrong format of realm") . '"'; ?>); |
|
| 733 | + $('#admin_realm').attr('title', <?php echo '"'._("Wrong format of realm").'"'; ?>); |
|
| 734 | 734 | } else { |
| 735 | 735 | $('#admin_realm').removeClass('error_input'); |
| 736 | 736 | $('#admin_realm').attr('title', ''); |
@@ -744,7 +744,7 @@ discard block |
||
| 744 | 744 | $(document).on('keyup change', '#email' , function() { |
| 745 | 745 | if ($(this).val().length == 0 || !isEmail($(this).val())) { |
| 746 | 746 | $('#email').addClass('error_input'); |
| 747 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
| 747 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
| 748 | 748 | } else { |
| 749 | 749 | $('#email').removeClass('error_input'); |
| 750 | 750 | $('#email').attr('title', ''); |
@@ -757,7 +757,7 @@ discard block |
||
| 757 | 757 | if ($('#mac').val().length > 0) { |
| 758 | 758 | if ($('#mac').val().length != 17) { |
| 759 | 759 | $('#mac').addClass('error_input'); |
| 760 | - $('#mac').attr('title', <?php echo '"' . _("MAC address is incomplete") . '"'; ?>); |
|
| 760 | + $('#mac').attr('title', <?php echo '"'._("MAC address is incomplete").'"'; ?>); |
|
| 761 | 761 | } else { |
| 762 | 762 | $('#mac').removeClass('error_input'); |
| 763 | 763 | $('#mac').attr('title', ''); |
@@ -766,7 +766,7 @@ discard block |
||
| 766 | 766 | if ($(this).attr('id') == 'email' && $(this).val().length > 0) { |
| 767 | 767 | if (!isEmail($(this).val())) { |
| 768 | 768 | $('#email').addClass('error_input'); |
| 769 | - $('#email').attr('title', <?php echo '"' . _("Wrong format of email") . '"'; ?>); |
|
| 769 | + $('#email').attr('title', <?php echo '"'._("Wrong format of email").'"'; ?>); |
|
| 770 | 770 | } else { |
| 771 | 771 | $('#email').removeClass('error_input'); |
| 772 | 772 | $('#email').attr('title', ''); |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | if ($(this).attr('id') == 'outer_id' && $(this).val().length > 0) { |
| 776 | 776 | if (!isEmail($(this).val(), true)) { |
| 777 | 777 | $('#outer_id').addClass('error_input'); |
| 778 | - $('#outer_id').attr('title', <?php echo '"' . _("Wrong format of outer ID") . '"'; ?>); |
|
| 778 | + $('#outer_id').attr('title', <?php echo '"'._("Wrong format of outer ID").'"'; ?>); |
|
| 779 | 779 | } else { |
| 780 | 780 | $('#outer_id').removeClass('error_input'); |
| 781 | 781 | $('#outer_id').attr('title', ''); |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | if ($(this).attr('id') == 'opname' && $('#opname').val().length > 0) { |
| 785 | 785 | if (!isOperatorName($(this).val())) { |
| 786 | 786 | $('#opname').addClass('error_input'); |
| 787 | - $('#opname').attr('title', <?php echo '"' . _("Wrong string given as OperatorName") . '"'; ?>); |
|
| 787 | + $('#opname').attr('title', <?php echo '"'._("Wrong string given as OperatorName").'"'; ?>); |
|
| 788 | 788 | $('#spmanually').show(); |
| 789 | 789 | } else { |
| 790 | 790 | $('#opname').removeClass('error_input'); |
@@ -62,24 +62,24 @@ discard block |
||
| 62 | 62 | case "EXTERNAL": |
| 63 | 63 | case "FRONTEND": |
| 64 | 64 | case "DIAGNOSTICS": |
| 65 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 65 | + if (!isset(self::${"instance".$theDb})) { |
|
| 66 | 66 | $class = __CLASS__; |
| 67 | - self::${"instance" . $theDb} = new $class($database); |
|
| 68 | - DBConnection::${"instance" . $theDb}->databaseInstance = $theDb; |
|
| 67 | + self::${"instance".$theDb} = new $class($database); |
|
| 68 | + DBConnection::${"instance".$theDb}->databaseInstance = $theDb; |
|
| 69 | 69 | } |
| 70 | - return self::${"instance" . $theDb}; |
|
| 70 | + return self::${"instance".$theDb}; |
|
| 71 | 71 | case "RADIUS": |
| 72 | - if (!isset(self::${"instance" . $theDb})) { |
|
| 72 | + if (!isset(self::${"instance".$theDb})) { |
|
| 73 | 73 | $class = __CLASS__; |
| 74 | 74 | foreach (\config\ConfAssistant::DB as $name => $oneRadiusAuthDb) { |
| 75 | 75 | $theInstance = new $class($name); |
| 76 | - self::${"instance" . $theDb}[] = $theInstance; |
|
| 76 | + self::${"instance".$theDb}[] = $theInstance; |
|
| 77 | 77 | $theInstance->databaseInstance = $theDb; |
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | - return self::${"instance" . $theDb}; |
|
| 80 | + return self::${"instance".$theDb}; |
|
| 81 | 81 | default: |
| 82 | - throw new Exception("This type of database (" . strtoupper($database) . ") is not known!"); |
|
| 82 | + throw new Exception("This type of database (".strtoupper($database).") is not known!"); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -123,18 +123,18 @@ discard block |
||
| 123 | 123 | } |
| 124 | 124 | } |
| 125 | 125 | // log exact query to debug log, if log level is at 5 |
| 126 | - $this->loggerInstance->debug(5, "DB ATTEMPT: ".$this->databaseInstance .": " . $querystring . "\n"); |
|
| 126 | + $this->loggerInstance->debug(5, "DB ATTEMPT: ".$this->databaseInstance.": ".$querystring."\n"); |
|
| 127 | 127 | if ($types !== NULL) { |
| 128 | - $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 128 | + $this->loggerInstance->debug(5, "Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | if ($this->connection->connect_error) { |
| 132 | - throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number" . $this->connection->connect_error . ")!"); |
|
| 132 | + throw new Exception("ERROR: Cannot send query to $this->databaseInstance database (no connection, error number".$this->connection->connect_error.")!"); |
|
| 133 | 133 | } |
| 134 | 134 | if ($types === NULL) { |
| 135 | 135 | $result = $this->connection->query($querystring); |
| 136 | 136 | if ($result === FALSE) { |
| 137 | - throw new Exception("DB: Unable to execute simple statement! Error was --> " . $this->connection->error . " <--"); |
|
| 137 | + throw new Exception("DB: Unable to execute simple statement! Error was --> ".$this->connection->error." <--"); |
|
| 138 | 138 | } |
| 139 | 139 | } else { |
| 140 | 140 | // fancy! prepared statement with dedicated argument list |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | $prepResult = $statementObject->prepare($querystring); |
| 152 | 152 | if ($prepResult === FALSE) { |
| 153 | - throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> " . $statementObject->error . " <--."); |
|
| 153 | + throw new Exception("DB: Unable to prepare statement! Statement was --> $querystring <--, error was --> ".$statementObject->error." <--."); |
|
| 154 | 154 | } |
| 155 | 155 | $this->preparedStatements[$querystring] = $statementObject; |
| 156 | 156 | } |
@@ -163,11 +163,11 @@ discard block |
||
| 163 | 163 | array_unshift($localArray, $types); |
| 164 | 164 | $retval = call_user_func_array([$statementObject, "bind_param"], $localArray); |
| 165 | 165 | if ($retval === FALSE) { |
| 166 | - throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> " . var_export($localArray, TRUE) . " <--. Error was --> " . $statementObject->error . " <--"); |
|
| 166 | + throw new Exception("DB: Unable to bind parameters to prepared statement! Argument array was --> ".var_export($localArray, TRUE)." <--. Error was --> ".$statementObject->error." <--"); |
|
| 167 | 167 | } |
| 168 | 168 | $result = $statementObject->execute(); |
| 169 | 169 | if ($result === FALSE) { |
| 170 | - throw new Exception("DB: Unable to execute prepared statement! Error was --> " . $statementObject->error . " <--"); |
|
| 170 | + throw new Exception("DB: Unable to execute prepared statement! Error was --> ".$statementObject->error." <--"); |
|
| 171 | 171 | } |
| 172 | 172 | $selectResult = $statementObject->get_result(); |
| 173 | 173 | if ($selectResult !== FALSE) { |
@@ -177,14 +177,14 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | // all cases where $result could be FALSE have been caught earlier |
| 179 | 179 | if ($this->connection->errno) { |
| 180 | - throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was " . $this->connection->errno . "!"); |
|
| 180 | + throw new Exception("ERROR: Cannot execute query in $this->databaseInstance database - (hopefully escaped) query was '$querystring', errno was ".$this->connection->errno."!"); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | |
| 184 | 184 | if ($isMoreThanSelect || \config\Master::DEBUG_LEVEL == 5) { |
| 185 | - $this->loggerInstance->writeSQLAudit("[DB: " . strtoupper($this->databaseInstance) . "] " . $querystring); |
|
| 185 | + $this->loggerInstance->writeSQLAudit("[DB: ".strtoupper($this->databaseInstance)."] ".$querystring); |
|
| 186 | 186 | if ($types !== NULL) { |
| 187 | - $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: " . /** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 187 | + $this->loggerInstance->writeSQLAudit("Argument type sequence: $types, parameters are: "./** @scrutinizer ignore-type */ print_r($arguments, true)); |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | return $result; |
@@ -282,14 +282,14 @@ discard block |
||
| 282 | 282 | if (isset(\config\Master::DB[$databaseCapitalised])) { |
| 283 | 283 | $this->connection = new \mysqli(\config\Master::DB[$databaseCapitalised]['host'], \config\Master::DB[$databaseCapitalised]['user'], \config\Master::DB[$databaseCapitalised]['pass'], \config\Master::DB[$databaseCapitalised]['db']); |
| 284 | 284 | if ($this->connection->connect_error) { |
| 285 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 285 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 286 | 286 | } |
| 287 | 287 | $this->readOnly = \config\Master::DB[$databaseCapitalised]['readonly']; |
| 288 | 288 | $this->dbName = \config\Master::DB[$databaseCapitalised]['db']; |
| 289 | 289 | } else { // one of the RADIUS DBs |
| 290 | 290 | $this->connection = new \mysqli(\config\ConfAssistant::DB[$databaseCapitalised]['host'], \config\ConfAssistant::DB[$databaseCapitalised]['user'], \config\ConfAssistant::DB[$databaseCapitalised]['pass'], \config\ConfAssistant::DB[$databaseCapitalised]['db']); |
| 291 | 291 | if ($this->connection->connect_error) { |
| 292 | - throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number " . $this->connection->connect_errno . ")."); |
|
| 292 | + throw new Exception("ERROR: Unable to connect to $database database! This is a fatal error, giving up (error number ".$this->connection->connect_errno.")."); |
|
| 293 | 293 | } |
| 294 | 294 | $this->readOnly = \config\ConfAssistant::DB[$databaseCapitalised]['readonly']; |
| 295 | 295 | $this->dbName = \config\ConfAssistant::DB[$databaseCapitalised]['db']; |
@@ -115,12 +115,12 @@ discard block |
||
| 115 | 115 | $this->name = $this->languageInstance->getLocalisedValue($this->getAttributes('general:instname')); |
| 116 | 116 | $eligibility = $this->eligibility($instQuery->type); |
| 117 | 117 | if (in_array(IdP::ELIGIBILITY_IDP, $eligibility) && in_array(IdP::ELIGIBILITY_SP, $eligibility)) { |
| 118 | - $eligType = IdP::TYPE_IDPSP . ""; |
|
| 118 | + $eligType = IdP::TYPE_IDPSP.""; |
|
| 119 | 119 | $this->type = $eligType; |
| 120 | 120 | } elseif (in_array(IdP::ELIGIBILITY_IDP, $eligibility)) { |
| 121 | - $eligType = IdP::TYPE_IDP . ""; |
|
| 121 | + $eligType = IdP::TYPE_IDP.""; |
|
| 122 | 122 | } else { |
| 123 | - $eligType = IdP::TYPE_SP . ""; |
|
| 123 | + $eligType = IdP::TYPE_SP.""; |
|
| 124 | 124 | } |
| 125 | 125 | $this->type = $eligType; |
| 126 | 126 | $this->loggerInstance->debug(4, "--- END Constructing new IdP object $instId ... ---\n"); |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | */ |
| 135 | 135 | public function listProfiles(bool $activeOnly = FALSE) |
| 136 | 136 | { |
| 137 | - $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier" . ($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference"; |
|
| 137 | + $query = "SELECT profile_id FROM profile WHERE inst_id = $this->identifier".($activeOnly ? " AND showtime = 1" : "")." ORDER BY preference"; |
|
| 138 | 138 | $allProfiles = $this->databaseHandle->exec($query); |
| 139 | 139 | $returnarray = []; |
| 140 | 140 | // SELECT -> resource, not boolean |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $returnarray[] = $oneProfile; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | - $this->loggerInstance->debug(4, "listProfiles: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
| 147 | + $this->loggerInstance->debug(4, "listProfiles: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
| 148 | 148 | return $returnarray; |
| 149 | 149 | } |
| 150 | 150 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function listDeployments(bool $activeOnly = FALSE) |
| 158 | 158 | { |
| 159 | - $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier" . ($activeOnly ? " AND status = " . AbstractDeployment::ACTIVE : ""); |
|
| 159 | + $query = "SELECT deployment_id FROM deployment WHERE inst_id = $this->identifier".($activeOnly ? " AND status = ".AbstractDeployment::ACTIVE : ""); |
|
| 160 | 160 | $allDeployments = $this->databaseHandle->exec($query); |
| 161 | 161 | $returnarray = []; |
| 162 | 162 | // SELECT -> resource, not boolean |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $returnarray[] = new DeploymentManaged($this, $deploymentQuery->deployment_id); |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - $this->loggerInstance->debug(4, "listDeployments: " . /** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
| 167 | + $this->loggerInstance->debug(4, "listDeployments: "./** @scrutinizer ignore-type */ print_r($returnarray, true)); |
|
| 168 | 168 | return $returnarray; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | $redirectProfileIds = []; |
| 191 | 191 | $allProfileLevels = $this->databaseHandle->exec("SELECT profile_id, sufficient_config + showtime AS maxlevel FROM profile WHERE inst_id = $this->identifier ORDER BY maxlevel DESC"); |
| 192 | 192 | // SELECT yields a resource, not a boolean |
| 193 | - if ($allProfileLevels->num_rows == 0 ) { |
|
| 193 | + if ($allProfileLevels->num_rows == 0) { |
|
| 194 | 194 | return self::PROFILES_INCOMPLETE; |
| 195 | 195 | } |
| 196 | 196 | $allProfilesArray = $allProfileLevels->fetch_all(MYSQLI_ASSOC); |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | $allProfiles = $this->databaseHandle->exec("SELECT MIN(openroaming) AS maxlevel FROM profile WHERE inst_id = $this->identifier"); |
| 219 | 219 | // SELECT yields a resource, not a boolean |
| 220 | 220 | while ($res = mysqli_fetch_object(/** @scrutinizer ignore-type */ $allProfiles)) { |
| 221 | - return (is_numeric($res->maxlevel) ? (int)$res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO ); // insts without profiles should get a "NO" |
|
| 221 | + return (is_numeric($res->maxlevel) ? (int) $res->maxlevel : AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO); // insts without profiles should get a "NO" |
|
| 222 | 222 | } |
| 223 | 223 | return AbstractProfile::OVERALL_OPENROAMING_LEVEL_NO; |
| 224 | 224 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | case AbstractProfile::PROFILETYPE_SILVERBULLET: |
| 350 | 350 | $theProfile = new ProfileSilverbullet($identifier, $this); |
| 351 | 351 | $theProfile->addSupportedEapMethod(new \core\common\EAP(\core\common\EAP::EAPTYPE_SILVERBULLET), 1); |
| 352 | - $theProfile->setRealm($this->identifier . "-" . $theProfile->identifier . "." . strtolower($this->federation) . strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
| 352 | + $theProfile->setRealm($this->identifier."-".$theProfile->identifier.".".strtolower($this->federation).strtolower(\config\ConfAssistant::SILVERBULLET['realm_suffix'])); |
|
| 353 | 353 | return $theProfile; |
| 354 | 354 | default: |
| 355 | 355 | throw new Exception("This type of profile is unknown and can not be added."); |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | public function getExternalDBId() |
| 493 | 493 | { |
| 494 | 494 | if (\config\ConfAssistant::CONSORTIUM['name'] == "eduroam" && isset(\config\ConfAssistant::CONSORTIUM['deployment-voodoo']) && \config\ConfAssistant::CONSORTIUM['deployment-voodoo'] == "Operations Team") { // SW: APPROVED |
| 495 | - $idQuery = $this->databaseHandle->exec("SELECT external_db_id, country FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = " . self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
| 495 | + $idQuery = $this->databaseHandle->exec("SELECT external_db_id, country FROM institution WHERE inst_id = $this->identifier AND external_db_syncstate = ".self::EXTERNAL_DB_SYNCSTATE_SYNCED); |
|
| 496 | 496 | // SELECT -> it's a resource, not a boolean |
| 497 | 497 | if (mysqli_num_rows(/** @scrutinizer ignore-type */ $idQuery) == 0) { |
| 498 | 498 | return FALSE; |
@@ -560,16 +560,16 @@ discard block |
||
| 560 | 560 | } |
| 561 | 561 | foreach ($baseline as $lang => $value) { |
| 562 | 562 | if (!key_exists($lang, $newvalues)) { |
| 563 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] DELETED"; |
|
| 563 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] DELETED"; |
|
| 564 | 564 | } else { |
| 565 | 565 | if ($value != $newvalues[$lang]) { |
| 566 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] CHANGED from '" . $baseline[$lang] . "' to '" . $newvalues[$lang] . "'"; |
|
| 566 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] CHANGED from '".$baseline[$lang]."' to '".$newvalues[$lang]."'"; |
|
| 567 | 567 | } |
| 568 | 568 | } |
| 569 | 569 | } |
| 570 | 570 | foreach ($newvalues as $lang => $value) { |
| 571 | 571 | if (!key_exists($lang, $baseline)) { |
| 572 | - $retval[IdP::INSTNAME_CHANGED] .= "#[Language " . strtoupper($lang) . "] ADDED as '" . $value . "'"; |
|
| 572 | + $retval[IdP::INSTNAME_CHANGED] .= "#[Language ".strtoupper($lang)."] ADDED as '".$value."'"; |
|
| 573 | 573 | } |
| 574 | 574 | } |
| 575 | 575 | return $retval; |