Project

General

Profile

« Previous | Next » 

Revision f6fac5ac

Added by Phil Davis over 9 years ago

system_crlmanager dodgy else statement

The "else" that was at line 550 should enclose the whole block of code below it. The "if" handles the case "No Certificates Found for this CA." and all the code below the else should only happen when there are certificates found.

View differences:

src/usr/local/www/system_crlmanager.php
533 533
?>
534 534
				</tbody>
535 535
			</table>
536
<?php } ?>
536
<?php
537
	}
538
?>
537 539
		</div>
538 540
	</div>
539 541
<?php
......
545 547
		}
546 548
	}
547 549

  
548
	if (count($ca_certs) == 0)
550
	if (count($ca_certs) == 0) {
549 551
		print_info_box(gettext("No Certificates Found for this CA."), 'danger');
550
	else
552
	} else {
553
		$section = new Form_Section('Choose a certificate to revoke');
554
		$group = new Form_Group(null);
551 555

  
552
	$section = new Form_Section('Choose a certificate to revoke');
553
	$group = new Form_Group(null);
556
		$group->add(new Form_Select(
557
			'certref',
558
			null,
559
			$pconfig['certref'],
560
			build_cacert_list()
561
			))->setWidth(4)->setHelp('Certificate');
554 562

  
555
	$group->add(new Form_Select(
556
		'certref',
557
		null,
558
		$pconfig['certref'],
559
		build_cacert_list()
560
		))->setWidth(4)->setHelp('Certificate');
563
		$group->add(new Form_Select(
564
			'crlreason',
565
			null,
566
			-1,
567
			$openssl_crl_status
568
			))->setHelp('Reason');
561 569

  
562
	$group->add(new Form_Select(
563
		'crlreason',
564
		null,
565
		-1,
566
		$openssl_crl_status
567
		))->setHelp('Reason');
570
		$group->add(new Form_Button(
571
			'submit',
572
			'Add'
573
			))->removeClass('btn-primary')->addClass('btn-success btn-sm');
568 574

  
569
	$group->add(new Form_Button(
570
		'submit',
571
		'Add'
572
		))->removeClass('btn-primary')->addClass('btn-success btn-sm');
575
		$section->add($group);
573 576

  
574
	$section->add($group);
577
		$section->addInput(new Form_Input(
578
			'id',
579
			null,
580
			'hidden',
581
			$crl['refid']
582
		));
575 583

  
576
	$section->addInput(new Form_Input(
577
		'id',
578
		null,
579
		'hidden',
580
		$crl['refid']
581
	));
584
		$section->addInput(new Form_Input(
585
			'act',
586
			null,
587
			'hidden',
588
			'addcert'
589
		));
582 590

  
583
	$section->addInput(new Form_Input(
584
		'act',
585
		null,
586
		'hidden',
587
		'addcert'
588
	));
591
		$section->addInput(new Form_Input(
592
			'crlref',
593
			null,
594
			'hidden',
595
			$crl['refid']
596
		));
589 597

  
590
	$section->addInput(new Form_Input(
591
		'crlref',
592
		null,
593
		'hidden',
594
		$crl['refid']
595
	));
598
		$form->add($section);
599
	}
596 600

  
597
	$form->add($section);
598 601
	print($form);
599 602
} else {
600 603
?>

Also available in: Unified diff