making config addToArray only add if it's not already there.
This commit is contained in:
parent
71881282aa
commit
3fad0b078f
2 changed files with 8 additions and 1 deletions
|
|
@ -79,6 +79,7 @@ sub addToArray {
|
|||
my $property = shift;
|
||||
my $value = shift;
|
||||
my $array = $self->get($property);
|
||||
return undef if isIn($value,@{$array});
|
||||
push(@{$array}, $value);
|
||||
$self->set($property, $array);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue