[interchange] Move initialization of UrlJoiner and UrlSplittor globals to global_directive_postprocess function.

Stefan Hornburg interchange-cvs at icdevgroup.org
Thu Aug 26 08:22:37 UTC 2010


commit c92adb1ab4ad7ec2dd71468c97bcb3288ecbb7ad
Author: Stefan Hornburg (Racke) <racke at linuxia.de>
Date:   Thu Aug 26 10:14:36 2010 +0200

    Move initialization of UrlJoiner and UrlSplittor globals to global_directive_postprocess function.
    This fixes a configuration inconsistency where MV_HTML4_COMPLIANT was only effective if
    UrlSepChar configuration directive was specified and specified after MV_HTML4_COMPLIANT was set.

 lib/Vend/Config.pm |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/lib/Vend/Config.pm b/lib/Vend/Config.pm
index 78350ea..1355368 100644
--- a/lib/Vend/Config.pm
+++ b/lib/Vend/Config.pm
@@ -3637,6 +3637,15 @@ sub set_default_search {
 );
 
 sub global_directive_postprocess {
+	if($Global::UrlSepChar eq '&') {
+		$Global::UrlJoiner = $Global::Variable->{MV_HTML4_COMPLIANT} ? '&amp;' : '&';
+		$Global::UrlSplittor = qr/\&/;
+	}
+	else {
+		$Global::UrlJoiner = $Global::UrlSepChar;
+		$Global::UrlSplittor = qr/[&$Global::UrlSepChar]/o;
+	}
+		
 	$Global::CountrySubdomains ||= {};
 
 	while (my ($key,$val) = each(%$Global::CountrySubdomains)) {
@@ -3728,14 +3737,6 @@ sub parse_url_sep_char {
 		config_warn("%s character value '%s' not a recommended value.", $var, $val);
 	}
 
-	if($val eq '&') {
-		$Global::UrlJoiner = $Global::Variable->{MV_HTML4_COMPLIANT} ? '&amp;' : '&';
-		$Global::UrlSplittor = qr/\&/;
-	}
-	else {
-		$Global::UrlJoiner = $val;
-		$Global::UrlSplittor = qr/[&$val]/o;
-	}
 	return $val;
 }
 



More information about the interchange-cvs mailing list