summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Konold <martin.konold@erfrakon.de>2007-01-06 21:36:20 (GMT)
committerMartin Konold <martin.konold@erfrakon.de>2007-01-06 21:36:20 (GMT)
commit681d60c2a24f1fd2f77be1ae44d2a680c08984d1 (patch)
tree069fc1d686c23736e26bab3ba12a72a6735b3b3a
parente55e4897a303d8571d02a3dc2b15bbd5c992b687 (diff)
downloadperl-Kolab-2.1-beta4.tar.gz
Martin Konold: Applied patch from Joergen Fjeld <jhf@linpro.no> which fixes the masquerade problem https://intevation.de/roundup/kolab/issue15502.1-rc12.1-beta4
-rw-r--r--Kolab-Conf/Changes3
-rw-r--r--Kolab-Conf/Conf.pm.in23
2 files changed, 16 insertions, 10 deletions
diff --git a/Kolab-Conf/Changes b/Kolab-Conf/Changes
index c84954f..04a9413 100644
--- a/Kolab-Conf/Changes
+++ b/Kolab-Conf/Changes
@@ -3,4 +3,5 @@ Revision history for Perl extension Kolab::Conf.
0.01 Thu Nov 6 14:07:19 2003
- original version; created by h2xs 1.22 with options
-XA -n Kolab::Conf
-
+0.02 Sa 6. Jan 22:35:25 2007
+ - fixes order of domains see also https://intevation.de/roundup/kolab/issue1550
diff --git a/Kolab-Conf/Conf.pm.in b/Kolab-Conf/Conf.pm.in
index f027cbe..89af10c 100644
--- a/Kolab-Conf/Conf.pm.in
+++ b/Kolab-Conf/Conf.pm.in
@@ -4,12 +4,12 @@ package Kolab::Conf;
## Copyright (c) 2004 Klaraelvdalens Datakonsult AB
## Copyright (c) 2003 Code Fusion cc
##
-## Writen by Stuart Bingë <s.binge@codefusion.co.za>
+## Written by Stuart Bingë <s.binge@codefusion.co.za>
## Portions based on work by the following people:
##
-## (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
-## (c) 2003 Martin Konold <martin.konold@erfrakon.de>
-## (c) 2003 Achim Frank <achim.frank@erfrakon.de>
+## (c) 2003 Tassilo Erlewein <tassilo.erlewein@erfrakon.de>
+## (c) 2003-2006 Martin Konold <martin.konold@erfrakon.de>
+## (c) 2003 Achim Frank <achim.frank@erfrakon.de>
##
##
## This program is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ package Kolab::Conf;
## You can view the GNU General Public License, online, at the GNU
## Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
##
-
+## Version 0.02
use 5.008;
use strict;
use warnings;
@@ -277,11 +277,16 @@ sub build {
} else {
# Modifier functions
SWITCH: {
- # Join function
+ # Join function
$fct eq 'join' && do {
- $val = join $args, (ref $Kolab::config{$attr} eq "ARRAY")
- ?@{$Kolab::config{$attr}}
- :($Kolab::config{$attr});
+ if (ref $Kolab::config{$attr} eq "ARRAY") {
+ my @vals = @{$Kolab::config{$attr}} ;
+ # We want to make sure subdomain.domain.tld comes before domain.tld
+ my @length_sorted_vals = sort {length $a cmp length $b} @vals;
+ $val = join ($args, @length_sorted_vals) ;
+ } else {
+ $val = $Kolab::config{$attr};
+ }
last SWITCH;
};
# Quote function