@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $this->context->createInvitation($user, $this, $max); |
| 50 | 50 | $userCount++; |
| 51 | 51 | } |
| 52 | - }else{ |
|
| 52 | + } else{ |
|
| 53 | 53 | $this->storeErrorMessage(sprintf(_('Username or expiry date missing for %s record!'), $userCount + 1)); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $acknowledgeLevel = $user->getAcknowledgeLevel(); |
| 159 | 159 | if($acknowledgeLevel == SilverbulletUser::LEVEL_YELLOW){ |
| 160 | 160 | $row->addAttribute('style', 'background-color:#F0EAC0;'); |
| 161 | - }elseif ($acknowledgeLevel == SilverbulletUser::LEVEL_RED){ |
|
| 161 | + } elseif ($acknowledgeLevel == SilverbulletUser::LEVEL_RED){ |
|
| 162 | 162 | $row->addAttribute('style', 'background-color:#F0C0C0;'); |
| 163 | 163 | } |
| 164 | 164 | |
@@ -215,11 +215,11 @@ discard block |
||
| 215 | 215 | $certificateBox->addAttribute('style', 'background-color:#F0C0C0;'); |
| 216 | 216 | $buttonContainer->addAttribute('style', 'height:22px; margin-top:7px; text-align:center;'); |
| 217 | 217 | $buttonContainer->addText(_("REVOKED")); |
| 218 | - }elseif ($certificate->isExpired()){ |
|
| 218 | + } elseif ($certificate->isExpired()){ |
|
| 219 | 219 | $certificateBox->addAttribute('style', 'background-color:lightgrey;'); |
| 220 | 220 | $buttonContainer->addAttribute('style', 'height:22px; margin-top:7px; text-align:center;'); |
| 221 | 221 | $buttonContainer->addText(_("EXPIRED")); |
| 222 | - }else{ |
|
| 222 | + } else{ |
|
| 223 | 223 | $buttonContainer->addAttribute('style', 'text-align:right;padding-top: 5px;'); |
| 224 | 224 | $buttonContainer->addText(new Button(_('Revoke'), 'submit', RevokeCertificateCommand::COMMAND, $certificate->getIdentifier(), 'delete')); |
| 225 | 225 | } |
@@ -15,7 +15,9 @@ |
||
| 15 | 15 | use web\lib\admin\http\SilverbulletContext; |
| 16 | 16 | use web\lib\admin\domain\SilverbulletInvitation; |
| 17 | 17 | |
| 18 | -if ( !isset( $_SESSION ) ) $_SESSION = array(); |
|
| 18 | +if ( !isset( $_SESSION ) ) { |
|
| 19 | + $_SESSION = array(); |
|
| 20 | +} |
|
| 19 | 21 | |
| 20 | 22 | class MockInstitutionPageBuilder extends InstitutionPageBuilder{ |
| 21 | 23 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | |
| 46 | 46 | if($user->isExpired()){ |
| 47 | 47 | $this->storeErrorMessage(sprintf(_("User '%s' has expired. In order to generate credentials please extend the expiry date!"), $user->getUsername())); |
| 48 | - }else{ |
|
| 48 | + } else{ |
|
| 49 | 49 | $this->context->createInvitation($user, $this, (int) $invitationsQuantity); |
| 50 | 50 | if(!is_numeric($invitationsQuantity)){ |
| 51 | 51 | $this->storeErrorMessage(sprintf(_("Invitations quantity '%' provided for user '%s' was not numeric. Assumed quantity as '1' !"), $invitationsQuantity, $user->getUsername())); |
@@ -160,9 +160,9 @@ |
||
| 160 | 160 | |
| 161 | 161 | if ($this->isRevoked()){ |
| 162 | 162 | $link = _('This token has been revoked!'); |
| 163 | - }else if($this->isAbsent()){ |
|
| 163 | + } else if($this->isAbsent()){ |
|
| 164 | 164 | $link = _('All available activations were used!'); |
| 165 | - }else if ($this->isExpired()) { |
|
| 165 | + } else if ($this->isExpired()) { |
|
| 166 | 166 | $link = _('User did not consume the token and it expired!'); |
| 167 | 167 | } else { |
| 168 | 168 | $link .= '/accountstatus/accountstatus.php?token=' . $this->get(self::TOKEN); |
@@ -134,8 +134,9 @@ discard block |
||
| 134 | 134 | array_multisort($name, SORT_ASC, SORT_LOCALE_STRING, $displaylist); |
| 135 | 135 | setlocale(LC_ALL, $current_locale); |
| 136 | 136 | |
| 137 | - foreach ($displaylist as $id => $oneinst) |
|
| 138 | - echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>"; |
|
| 137 | + foreach ($displaylist as $id => $oneinst) { |
|
| 138 | + echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>"; |
|
| 139 | + } |
|
| 139 | 140 | ?> |
| 140 | 141 | </select> |
| 141 | 142 | <button type='submit' class='submit'><?php echo _("Submit Information"); ?></button> |
@@ -198,10 +199,12 @@ discard block |
||
| 198 | 199 | $checkresult[$number] = $check['instance']->udpReachability($number, FALSE, FALSE); |
| 199 | 200 | if ($checkresult[$number] == \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { // so now things work?! |
| 200 | 201 | // either a packet size or Operator-Name problem! |
| 201 | - if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) |
|
| 202 | - $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 203 | - if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) |
|
| 204 | - $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 202 | + if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { |
|
| 203 | + $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 204 | + } |
|
| 205 | + if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { |
|
| 206 | + $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 207 | + } |
|
| 205 | 208 | } else { // still no response or immediate reject |
| 206 | 209 | // if this is a CAT realm with anon ID set, we can't be seeing an NPS ignorance problem |
| 207 | 210 | // and consequently, the realm has actual issues |
@@ -235,12 +238,13 @@ discard block |
||
| 235 | 238 | // re-write check history with that extra knowledge |
| 236 | 239 | $copycat = $realmproblems; |
| 237 | 240 | |
| 238 | - foreach ($realmproblems as &$problem) |
|
| 239 | - if ($problem['STATUS'] == "REALM_POSSIBLY_NPS") |
|
| 241 | + foreach ($realmproblems as &$problem) { |
|
| 242 | + if ($problem['STATUS'] == "REALM_POSSIBLY_NPS") |
|
| 240 | 243 | foreach ($copycat as $otherproblem) |
| 241 | 244 | if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] != "REALM_POSSIBLY_NPS") |
| 242 | 245 | if ($otherproblem['STATUS'] == "REACHABLE") { // worked elsewhere, but not on this probe: |
| 243 | 246 | $problem['STATUS'] = "REALM_DOWN"; |
| 247 | + } |
|
| 244 | 248 | } else { // inherit other problem; in any case not an NPS problem |
| 245 | 249 | $problem['STATUS'] = $otherproblem['STATUS']; |
| 246 | 250 | } |
@@ -250,11 +254,12 @@ discard block |
||
| 250 | 254 | |
| 251 | 255 | $copycat = $realmproblems; |
| 252 | 256 | |
| 253 | - foreach ($realmproblems as &$problem) |
|
| 254 | - if ($problem['STATUS'] == "REALM_DOWN") |
|
| 257 | + foreach ($realmproblems as &$problem) { |
|
| 258 | + if ($problem['STATUS'] == "REALM_DOWN") |
|
| 255 | 259 | foreach ($copycat as $otherproblem) |
| 256 | 260 | if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] == "REACHABLE") |
| 257 | 261 | $problem['STATUS'] = "INFRASTRUCTURE"; |
| 262 | + } |
|
| 258 | 263 | unset($problem); |
| 259 | 264 | |
| 260 | 265 | // finally, extract all certprobs we got from the reachability checks; merge from all |
@@ -265,8 +270,9 @@ discard block |
||
| 265 | 270 | foreach ($checks as $check) { |
| 266 | 271 | $instance = $check['instance']; |
| 267 | 272 | $resultset = $instance->UDP_reachability_result; |
| 268 | - foreach ($resultset as $result) |
|
| 269 | - $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']); |
|
| 273 | + foreach ($resultset as $result) { |
|
| 274 | + $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']); |
|
| 275 | + } |
|
| 270 | 276 | } |
| 271 | 277 | |
| 272 | 278 | // now we have something to say... |
@@ -251,10 +251,11 @@ |
||
| 251 | 251 | <allow-save>true</allow-save> |
| 252 | 252 | '; |
| 253 | 253 | if ($useAnon == 1) { |
| 254 | - if ($outer_user == '') |
|
| 255 | - $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
| 256 | - else |
|
| 257 | - $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
| 254 | + if ($outer_user == '') { |
|
| 255 | + $profileFileCont .= '<AnonymousIdentity>@</AnonymousIdentity>'; |
|
| 256 | + } else { |
|
| 257 | + $profileFileCont .= '<AnonymousIdentity>' . $outer_id . '</AnonymousIdentity>'; |
|
| 258 | + } |
|
| 258 | 259 | } |
| 259 | 260 | $profileFileCont .= '</ClientSideCredential> |
| 260 | 261 | <ServerSideCredential> |