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

Stefan Hornburg <[email protected]>
Newsgroups gmane.comp.web.interchange.cvs
Message-ID <[email protected]>
commit c92adb1ab4ad7ec2dd71468c97bcb3288ecbb7ad
Author: Stefan Hornburg (Racke) <[email protected]>
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;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.