[interchange-cvs] interchange - racke modified
lib/Vend/Interpolate.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Mon Nov 7 16:22:25 EST 2005
User: racke
Date: 2005-11-07 21:22:24 GMT
Modified: lib/Vend Interpolate.pm
Log:
added flypage SpecialSub according to the discussion on interchange-core in
November 2003
Revision Changes Path
2.258 +13 -5 interchange/lib/Vend/Interpolate.pm
rev 2.258, prev_rev 2.257
Index: Interpolate.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.257
retrieving revision 2.258
diff -u -r2.257 -r2.258
--- Interpolate.pm 31 Oct 2005 18:00:38 -0000 2.257
+++ Interpolate.pm 7 Nov 2005 21:22:24 -0000 2.258
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.257 2005/10/31 18:00:38 mheins Exp $
+# $Id: Interpolate.pm,v 2.258 2005/11/07 21:22:24 racke 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.257 $, 10);
+$VERSION = substr(q$Revision: 2.258 $, 10);
@EXPORT = qw (
@@ -4854,7 +4854,7 @@
sub fly_page {
my($code, $opt, $page) = @_;
- my $selector;
+ my ($selector, $subname, $base, $listref);
return $page if (! $code and $Vend::Flypart eq $Vend::FinalPath);
@@ -4863,7 +4863,15 @@
$Vend::Flypart = $code;
- my $base = product_code_exists_ref($code);
+ if ($subname = $Vend::Cfg->{SpecialSub}{flypage}) {
+ my $sub = $Vend::Cfg->{Sub}{$subname} || $Global::GlobalSub->{$subname};
+ $listref = $sub->($code);
+ $base = $listref;
+ } else {
+ $base = product_code_exists_ref($code);
+ $listref = {mv_results => [[$code]]};
+ }
+
#::logDebug("fly_page: code=$code base=$base page=" . substr($page, 0, 100));
return undef unless $base || $opt->{onfly};
@@ -4912,7 +4920,7 @@
list_compat($opt->{prefix}, \$page) if $page;
# END LEGACY
- return labeled_list( {}, $page, { mv_results => [[$code]] });
+ return labeled_list( {}, $page, $listref);
}
sub item_difference {
More information about the interchange-cvs
mailing list