[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Tue Jun 25 14:02:01 2002
User: heins
Date: 2002-06-25 18:01:33 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Add MINPAGE and MAXPAGE primitives for [page-anchor] in more-list.
This then:
[page-anchor]$MINPAGE$-$MAXPAGE$[/page-anchor]
shows:
Matches 6-10 of 17 found
_Previous_ _1-5_ 6-10 _11-15_ _16-17_ _Next_
Revision Changes Path
2.72 +7 -3 interchange/lib/Vend/Interpolate.pm
rev 2.72, prev_rev 2.71
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.71
retrieving revision 2.72
diff -u -r2.71 -r2.72
--- Interpolate.pm 25 Jun 2002 03:26:26 -0000 2.71
+++ Interpolate.pm 25 Jun 2002 18:01:33 -0000 2.72
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.71 2002/06/25 03:26:26 mheins Exp $
+# $Id: Interpolate.pm,v 2.72 2002/06/25 18:01:33 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.71 $, 10);
+$VERSION = substr(q$Revision: 2.72 $, 10);
@EXPORT = qw (
@@ -3476,6 +3476,9 @@
#::logDebug("more_link: inc=$inc current=$current");
$last = $next + $chunk - 1;
$last = ($last+1) < $total ? $last : ($total - 1);
+ $pa =~ s/__PAGE__/$inc/g;
+ $pa =~ s/__MINPAGE__/$next + 1/eg;
+ $pa =~ s/__MAXPAGE__/$last + 1/eg;
if($inc == $current) {
$pa =~ s/__BORDER__/$border_selected || $border || ''/e;
$list .= qq|<STRONG>$pa</STRONG> | ;
@@ -3608,7 +3611,6 @@
unless ($page_anchor) {
if($r =~ s:\[page[-_]anchor\]($All)\[/page[-_]anchor\]::i) {
$page_anchor = $1;
- $page_anchor =~ s/\$PAGE\$/__PAGE__/i;
}
else {
$page_anchor = '__PAGE__';
@@ -3617,6 +3619,8 @@
elsif ($page_anchor ne 'none') {
$page_anchor = qq%<IMG SRC="$page_anchor?__PAGE__"__BORDER__>%;
}
+
+ $page_anchor =~ s/\$(MIN|MAX)?PAGE\$/__${1}PAGE__/g;
my $more_string = ::errmsg('more');
my ($decade_next, $decade_prev, $decade_div);