[interchange-cvs] interchange - docelic modified lib/Vend/Config.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Thu Feb 3 09:52:20 EST 2005


User:      docelic
Date:      2005-02-03 14:52:20 GMT
Modified:  lib/Vend Config.pm
Log:
Moved the existing safety check just few lines up where it has access
to a variable it needs to produce the complete error message.

Old message:
Bad user tag parameter '' for 'forum_userlink', skipping.

New (fixed):
Bad user tag parameter 'PARM_NAME' for 'forum-userlink', skipping.

Revision  Changes    Path
2.155     +7 -7      interchange/lib/Vend/Config.pm


rev 2.155, prev_rev 2.154
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.154
retrieving revision 2.155
diff -u -r2.154 -r2.155
--- Config.pm	1 Feb 2005 02:07:14 -0000	2.154
+++ Config.pm	3 Feb 2005 14:52:19 -0000	2.155
@@ -1,6 +1,6 @@
 # Vend::Config - Configure Interchange
 #
-# $Id: Config.pm,v 2.154 2005/02/01 02:07:14 jon Exp $
+# $Id: Config.pm,v 2.155 2005/02/03 14:52:19 docelic Exp $
 #
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -49,7 +49,7 @@
 use Vend::File;
 use Vend::Data;
 
-$VERSION = substr(q$Revision: 2.154 $, 10);
+$VERSION = substr(q$Revision: 2.155 $, 10);
 
 my %CDname;
 my %CPname;
@@ -3973,17 +3973,17 @@
 	my $c = defined $C ? $C->{UserTag} : $Global::UserTag;
 
 	my($tag,$p,$val) = split /\s+/, $value, 3;
+
+	unless ( $tagCanon{lc $p} ) {
+		config_warn("Bad user tag parameter '%s' for '%s', skipping.", $p, $tag);
+		return $c;
+	}
 	
 	# Canonicalize
 	$p = $tagCanon{lc $p};
 	$tag =~ tr/-/_/;
 	$tag =~ s/\W//g
 		and config_warn("Bad characters removed from '%s'.", $tag);
-
-	unless ($p) {
-		config_warn("Bad user tag parameter '%s' for '%s', skipping.", $p, $tag);
-		return $c;
-	}
 
 	if($CodeDest and $CodeDest eq 'CoreTag') {
 		return $c unless $Global::TagInclude->{$tag} || $Global::TagInclude->{ALL};








More information about the interchange-cvs mailing list