bug fix: port free checking

This commit is contained in:
Oliver Gorwits
2013-09-11 22:34:13 +01:00
parent e0794567af
commit 1b37dfb438
2 changed files with 6 additions and 2 deletions

View File

@@ -53,7 +53,11 @@ ajax '/ajax/content/device/ports' => require_login sub {
}
# filter for port status if asked
my %port_state = map {$_ => 1} (param('port_state') || ());
my %port_state = map {$_ => 1}
(ref [] eq ref param('port_state') ? @{param('port_state')}
: param('port_state') ? param('port_state') : ());
return unless scalar keys %port_state;
if (exists $port_state{free}) {
if (scalar keys %port_state == 1) {