[interchange-cvs] interchange - jon modified lib/Vend/Interpolate.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Wed Mar 16 13:51:00 EST 2005
User: jon
Date: 2005-03-16 18:50:59 GMT
Modified: lib/Vend Interpolate.pm
Log:
Restore behavior of an empty [link-template][/link-template] block,
which used to fall back to the default link template, but then started
suppressing links altogether.
This was inadvertently changed in revision 2.119 of Vend::Interpolate
as part of a bug fix. The bug is now fixed in a different, compatible way.
Revision Changes Path
2.235 +6 -8 interchange/lib/Vend/Interpolate.pm
rev 2.235, prev_rev 2.234
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.234
retrieving revision 2.235
diff -u -u -r2.234 -r2.235
--- Interpolate.pm 8 Mar 2005 16:10:07 -0000 2.234
+++ Interpolate.pm 16 Mar 2005 18:50:59 -0000 2.235
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.234 2005/03/08 16:10:07 racke Exp $
+# $Id: Interpolate.pm,v 2.235 2005/03/16 18:50:59 jon Exp $
#
# Copyright (C) 2002-2005 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -28,7 +28,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.234 $, 10);
+$VERSION = substr(q$Revision: 2.235 $, 10);
@EXPORT = qw (
@@ -3150,12 +3150,10 @@
$border =~ s/\D//g;
}
- if ($r =~ s:\[link[-_]template\]($All)\[/link[-_]template\]::i) {
- $link_template = $1;
- }
- else {
- $link_template = q{<a href="$URL$">$ANCHOR$</a>};
- }
+ undef $link_template;
+ $r =~ s:\[link[-_]template\]($All)\[/link[-_]template\]::i
+ and $link_template = $1;
+ $link_template ||= q{<A HREF="$URL$">$ANCHOR$</A>};
if(! $chunk or $chunk >= $total) {
return '';
More information about the interchange-cvs
mailing list