summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 13:40:32 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 13:40:32 +0000
commit662f8abfa580ebc5ea33367786d5a7f80ade6162 (patch)
tree3b557021caa58cac5240b7cc1ca0f861059ba0a1 /bin
parent8ab02f76364e3a6b6c641e7264d31c5e05134609 (diff)
downloaddrakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar
drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.gz
drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.bz2
drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.tar.xz
drakguard-662f8abfa580ebc5ea33367786d5a7f80ade6162.zip
do not allow to enter an url twice in blacklist/whitelist
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/drakguard b/bin/drakguard
index 865b198..78d34be 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -191,7 +191,10 @@ ugtk2::exit(0);
sub list_add_addr {
my ($list, @addr) = @_;
- push @{$list->{data}}, $_ foreach @addr;
+ foreach my $a (@addr) {
+ push @{$list->{data}}, $a
+ unless any { $_->[0] eq $a } @{$list->{data}};
+ }
}
sub list_remove_addr {