aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2012-05-28 02:05:42 +0200
committerStefan Kangas <skangas@skangas.se>2012-05-28 02:05:42 +0200
commit3c5d81e4e157d4cd1abc10bb76811e16936bdf6d (patch)
treed7349ce565105924725b9b28d20c945e233de796
parentec027c2c3595a43a2fa41d5e61a8b2a1c4c4fe4d (diff)
searchalias: Fix silly bug with operator associativity
-rwxr-xr-xfripost-searchalias16
1 files changed, 8 insertions, 8 deletions
diff --git a/fripost-searchalias b/fripost-searchalias
index 719cd01..65f1d4b 100755
--- a/fripost-searchalias
+++ b/fripost-searchalias
@@ -139,15 +139,10 @@ sub perform_search {
my $f = $conf->{from};
my $g = $conf->{goto};
-my $from ||= $f || not $f && not $g;
-my $goto ||= $g || not $f && not $g;
+my $from = $f || !$f && !$g;
+my $goto = $g || !$f && !$g;
-if ($g) {
- say " Searchin 'goto'";
- perform_search(goto => $ARGV[0]);
-}
-
-if ($f) {
+if ($from) {
say " Searchin 'from'";
perform_search(address => $ARGV[0]);
@@ -157,6 +152,11 @@ if ($f) {
or die "Error: Unknown domain `$d'.\n";
}
+if ($goto) {
+ say " Searchin 'goto'";
+ perform_search(goto => $ARGV[0]);
+}
+
$ldap->unbind();