@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | |
| 265 | 265 | $details['name'] = preg_replace('/(.)\/(.)/', "$1<br/>$2", $details['name']); |
| 266 | 266 | $details['name'] = preg_replace('/\//', "", $details['name']); |
| 267 | - $certstatus = ( $details['root'] == 1 ? "R" : "I"); |
|
| 267 | + $certstatus = ($details['root'] == 1 ? "R" : "I"); |
|
| 268 | 268 | if ($details['ca'] == 0 && $details['root'] != 1) { |
| 269 | 269 | return "<div class='ca-summary' style='background-color:red'><div style='position:absolute; right: 0px; width:20px; height:20px; background-color:maroon; border-radius:10px; text-align: center;'><div style='padding-top:3px; font-weight:bold; color:#ffffff;'>S</div></div>" . _("This is a <strong>SERVER</strong> certificate!") . "<br/>" . $details['name'] . "</div>"; |
| 270 | 270 | } |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | } |
| 340 | 340 | break; |
| 341 | 341 | case "boolean": |
| 342 | - $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off") ) . "</strong></td></tr>"; |
|
| 342 | + $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>" . ($content == "on" ? _("on") : _("off")) . "</strong></td></tr>"; |
|
| 343 | 343 | break; |
| 344 | 344 | default: |
| 345 | 345 | $retval .= "<tr><td>" . display_name($option['name']) . "</td><td>$language</td><td><strong>$content</strong></td></tr>"; |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | <select id='lang' name='lang' onchange='this.form.submit()'> |
| 78 | 78 | <?php |
| 79 | 79 | foreach (Config::$LANGUAGES as $lang => $value) { |
| 80 | - echo "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "" ) . " >" . $value['display'] . "</option> "; |
|
| 80 | + echo "<option value='$lang' " . (strtoupper($language) == strtoupper($lang) ? "selected" : "") . " >" . $value['display'] . "</option> "; |
|
| 81 | 81 | } |
| 82 | 82 | ?> |
| 83 | 83 | </select> |
@@ -69,14 +69,14 @@ |
||
| 69 | 69 | File "GEANTLink64.msi" |
| 70 | 70 | nsArray::Set Delete_files "GEANTLink64.msi" |
| 71 | 71 | DetailPrint "Install GEANTLink installer" |
| 72 | - MessageBox MB_OK "<?php echo_nsi( _("An additional piece of software 'GEANTlink' needs to be installed. This installation requires Administrator rights; you will be prompted to give permission for that action."))?>"
|
|
| 72 | + MessageBox MB_OK "<?php echo_nsi(_("An additional piece of software 'GEANTlink' needs to be installed. This installation requires Administrator rights; you will be prompted to give permission for that action."))?>"
|
|
| 73 | 73 | !insertmacro debug_cat 1 "Run GEANTLink installer" |
| 74 | 74 | !insertmacro debug_cat 3 'Execute: msiexec.exe /i "$OUTDIR\GEANTLink$Platform.msi"' |
| 75 | 75 | ClearErrors |
| 76 | 76 | ExecWait '$Msiexec.exe /i "$TEMP\GEANTLink$Platform.msi" /qb' $0 |
| 77 | 77 | !insertmacro debug_cat 4 "GEANTLink returned $0" |
| 78 | 78 | StrCmp $0 0 Cont2 |
| 79 | - MessageBox MB_OK "<?php echo_nsi( _("Error installing GEANTLink.\$\\nEmbedded installer didn't complete succesfully."))?>"
|
|
| 79 | + MessageBox MB_OK "<?php echo_nsi(_("Error installing GEANTLink.\$\\nEmbedded installer didn't complete succesfully."))?>"
|
|
| 80 | 80 | Quit |
| 81 | 81 | Cont2: |
| 82 | 82 | FunctionEnd |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | $numberQuery = DBConnection::exec("INST", $query); |
| 66 | 66 | while ($queryResult = mysqli_fetch_object($numberQuery)) { |
| 67 | - $dataArray[$deviceArray['display']] = ["ADMIN" => ( $queryResult->admin === NULL ? "0" : $queryResult->admin), "USER" => ($queryResult->user === NULL ? "0" : $queryResult->user)]; |
|
| 67 | + $dataArray[$deviceArray['display']] = ["ADMIN" => ($queryResult->admin === NULL ? "0" : $queryResult->admin), "USER" => ($queryResult->user === NULL ? "0" : $queryResult->user)]; |
|
| 68 | 68 | $grossAdmin = $grossAdmin + $queryResult->admin; |
| 69 | 69 | $grossUser = $grossUser + $queryResult->user; |
| 70 | 70 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $retstring .= "<tr><td><strong>TOTAL</strong></td><td><strong>" . $data['TOTAL']['ADMIN'] . "</strong></td><td><strong>" . $data['TOTAL']['USER'] . "</strong></td></tr>"; |
| 89 | 89 | break; |
| 90 | 90 | case "XML": |
| 91 | - $retstring .= "<federation id='" . ( $federationid == NULL ? "ALL" : $federationid ) . "' ts='" . date("Y-m-d") . "T" . date("H:i:s") . "'>\n"; |
|
| 91 | + $retstring .= "<federation id='" . ($federationid == NULL ? "ALL" : $federationid) . "' ts='" . date("Y-m-d") . "T" . date("H:i:s") . "'>\n"; |
|
| 92 | 92 | foreach ($data as $device => $numbers) { |
| 93 | 93 | if ($device == "TOTAL") { |
| 94 | 94 | continue; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | <key>PayloadIdentifier</key> |
| 122 | 122 | <string>" . mobileconfigSuperclass::$iPhonePayloadPrefix . ".$this->massagedConsortium.$this->massagedCountry.$this->massagedInst.$this->massagedProfile.$this->lang</string> |
| 123 | 123 | <key>PayloadOrganization</key> |
| 124 | - <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ( $this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
| 124 | + <string>" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['general:instname'][0]), ENT_XML1, 'UTF-8') . ($this->attributes['internal:profile_count'][0] > 1 ? " (" . htmlspecialchars(iconv("UTF-8", "UTF-8//IGNORE", $this->attributes['profile:name'][0]), ENT_XML1, 'UTF-8') . ")" : "") . "</string> |
|
| 125 | 125 | <key>PayloadType</key> |
| 126 | 126 | <string>Configuration</string> |
| 127 | 127 | <key>PayloadUUID</key> |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | return $retval; |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | - private function passPointBlock ($consortiumOi) { |
|
| 191 | + private function passPointBlock($consortiumOi) { |
|
| 192 | 192 | $retval = " |
| 193 | 193 | <key>IsHotspot</key> |
| 194 | 194 | <true/> |
@@ -44,10 +44,11 @@ discard block |
||
| 44 | 44 | // NAPTR existence check |
| 45 | 45 | $tabletext .= "<td>"; |
| 46 | 46 | $naptr = $testsuite->NAPTR(); |
| 47 | - if ($naptr != RETVAL_NOTCONFIGURED) |
|
| 48 | - switch ($naptr) { |
|
| 47 | + if ($naptr != RETVAL_NOTCONFIGURED) { |
|
| 48 | + switch ($naptr) { |
|
| 49 | 49 | case RETVAL_NONAPTR: |
| 50 | 50 | $tabletext .= _("No NAPTR records"); |
| 51 | + } |
|
| 51 | 52 | break; |
| 52 | 53 | case RETVAL_ONLYUNRELATEDNAPTR: |
| 53 | 54 | $tabletext .= sprintf(_("No associated NAPTR records")); |
@@ -73,8 +74,9 @@ discard block |
||
| 73 | 74 | } |
| 74 | 75 | if ($srv > 0) { |
| 75 | 76 | $hosts = $testsuite->NAPTR_hostnames(); |
| 76 | - if ($hosts == RETVAL_INVALID) |
|
| 77 | - $NAPTR_issues = true; |
|
| 77 | + if ($hosts == RETVAL_INVALID) { |
|
| 78 | + $NAPTR_issues = true; |
|
| 79 | + } |
|
| 78 | 80 | } |
| 79 | 81 | break; |
| 80 | 82 | } |
@@ -91,14 +93,17 @@ discard block |
||
| 91 | 93 | foreach (Config::$RADIUSTESTS['UDP-hosts'] as $hostindex => $host) { |
| 92 | 94 | $testsuite->UDP_reachability($hostindex, true, true); |
| 93 | 95 | $results = $testsuite->UDP_reachability_result[$hostindex]; |
| 94 | - if ($results['packetflow_sane'] != TRUE) |
|
| 95 | - $UDPErrors = true; |
|
| 96 | - if (empty($results['packetflow'][11])) |
|
| 97 | - $UDPErrors = true; |
|
| 96 | + if ($results['packetflow_sane'] != TRUE) { |
|
| 97 | + $UDPErrors = true; |
|
| 98 | + } |
|
| 99 | + if (empty($results['packetflow'][11])) { |
|
| 100 | + $UDPErrors = true; |
|
| 101 | + } |
|
| 98 | 102 | if (count($results['cert_oddities']) > 0) { |
| 99 | - foreach ($results['cert_oddities'] as $oddity) |
|
| 100 | - if ($oddity['level'] > $certBiggestOddity) |
|
| 103 | + foreach ($results['cert_oddities'] as $oddity) { |
|
| 104 | + if ($oddity['level'] > $certBiggestOddity) |
|
| 101 | 105 | $certBiggestOddity = $oddity['level']; |
| 106 | + } |
|
| 102 | 107 | } |
| 103 | 108 | } |
| 104 | 109 | |
@@ -119,8 +124,9 @@ discard block |
||
| 119 | 124 | if ($naptr > 0 && count($testsuite->NAPTR_hostname_records) > 0) { |
| 120 | 125 | foreach ($testsuite->NAPTR_hostname_records as $hostindex => $addr) { |
| 121 | 126 | $retval = $testsuite->TLS_clients_side_check($addr); |
| 122 | - if ($retval != RETVAL_OK && $retval != RETVAL_SKIPPED) |
|
| 123 | - $dynamicErrors = true; |
|
| 127 | + if ($retval != RETVAL_OK && $retval != RETVAL_SKIPPED) { |
|
| 128 | + $dynamicErrors = true; |
|
| 129 | + } |
|
| 124 | 130 | } |
| 125 | 131 | } |
| 126 | 132 | if (!$dynamicErrors) { |
@@ -162,10 +168,11 @@ discard block |
||
| 162 | 168 | $profiles_showtime = []; |
| 163 | 169 | $profiles_readyconf = []; |
| 164 | 170 | |
| 165 | -foreach ($allIDPs as $index => $oneidp) |
|
| 171 | +foreach ($allIDPs as $index => $oneidp) { |
|
| 166 | 172 | foreach ($oneidp['instance']->listProfiles() as $profile) |
| 167 | 173 | if ($profile->isShowtime()) { |
| 168 | 174 | $profiles_showtime[] = ['idp' => $oneidp['instance'], 'profile' => $profile]; |
| 175 | +} |
|
| 169 | 176 | } else if ($profile->readyForShowtime()) { |
| 170 | 177 | $profiles_confready[] = ['idp' => $oneidp['instance'], 'profile' => $profile]; |
| 171 | 178 | } |
@@ -173,16 +180,18 @@ discard block |
||
| 173 | 180 | if (count($profiles_showtime) > 0) { |
| 174 | 181 | echo "<h2>" . _("Profiles marked as visible (V)") . "</h2>" . "<table>"; |
| 175 | 182 | echo rowdescription(); |
| 176 | - foreach ($profiles_showtime as $oneprofile) |
|
| 177 | - echo profilechecks($oneprofile['idp'], $oneprofile['profile']); |
|
| 183 | + foreach ($profiles_showtime as $oneprofile) { |
|
| 184 | + echo profilechecks($oneprofile['idp'], $oneprofile['profile']); |
|
| 185 | + } |
|
| 178 | 186 | echo "</table>"; |
| 179 | 187 | } |
| 180 | 188 | |
| 181 | 189 | if (count($profiles_confready) > 0) { |
| 182 | 190 | echo "<h2>" . _("Profiles with sufficient configuration, not marked as visible (C)") . "</h2>" . "<table>"; |
| 183 | 191 | echo rowdescription(); |
| 184 | - foreach ($profiles_confready as $oneprofile) |
|
| 185 | - echo profilechecks($oneprofile['idp'], $oneprofile['profile']); |
|
| 192 | + foreach ($profiles_confready as $oneprofile) { |
|
| 193 | + echo profilechecks($oneprofile['idp'], $oneprofile['profile']); |
|
| 194 | + } |
|
| 186 | 195 | echo "</table>"; |
| 187 | 196 | } |
| 188 | 197 | ?> |
@@ -83,6 +83,7 @@ |
||
| 83 | 83 | /** |
| 84 | 84 | * executes a query and triggers logging to the SQL audit log if it's not a SELECT |
| 85 | 85 | * @param string $querystring the query to be executed |
| 86 | + * @param string $database |
|
| 86 | 87 | * @return mixed the query result as mysqli_result object; or TRUE on non-return-value statements |
| 87 | 88 | */ |
| 88 | 89 | public static function exec($database, $querystring) { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | function disp_name($eap) { |
| 29 | 29 | $displayName = EAP::eapDisplayName($eap); |
| 30 | - return $displayName['OUTER'] . ( $displayName['INNER'] != '' ? '-' . $displayName['INNER'] : ''); |
|
| 30 | + return $displayName['OUTER'] . ($displayName['INNER'] != '' ? '-' . $displayName['INNER'] : ''); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | function printDN($distinguishedName) { |
@@ -259,8 +259,8 @@ |
||
| 259 | 259 | $retval = []; |
| 260 | 260 | $invitations = $this->databaseHandle->exec("SELECT cat_institution_id, country, name, invite_issuer_level, invite_dest_mail, invite_token |
| 261 | 261 | FROM invitations |
| 262 | - WHERE cat_institution_id " . ( $idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL") . " AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
| 263 | - $this->loggerInstance->debug(4, "Retrieving pending invitations for " . ($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation" ) . ".\n"); |
|
| 262 | + WHERE cat_institution_id " . ($idpIdentifier != 0 ? "= $idpIdentifier" : "IS NULL") . " AND invite_created >= TIMESTAMPADD(DAY, -1, NOW()) AND used = 0"); |
|
| 263 | + $this->loggerInstance->debug(4, "Retrieving pending invitations for " . ($idpIdentifier != 0 ? "IdP $idpIdentifier" : "IdPs awaiting initial creation") . ".\n"); |
|
| 264 | 264 | while ($invitationQuery = mysqli_fetch_object($invitations)) { |
| 265 | 265 | $retval[] = ["country" => $invitationQuery->country, "name" => $invitationQuery->name, "mail" => $invitationQuery->invite_dest_mail, "token" => $invitationQuery->invite_token]; |
| 266 | 266 | } |