[interchange-cvs] interchange - heins modified 8 files

interchange-core@icdevgroup.org interchange-core@icdevgroup.org
Sat Oct 5 01:27:01 2002


User:      heins
Date:      2002-10-05 05:26:29 GMT
Modified:  .        MANIFEST
Modified:  code/SystemTag order.coretag
Modified:  code/UI_Tag auto_wizard.coretag regenerate.coretag
Modified:  lib/Vend DbSearch.pm Interpolate.pm Util.pm
Removed:   code/UI_Tag table_editor_tpl.coretag
Log:
* Change URL generation to streamline and bring one generation routine
  for form_link, tag_page, tag_area.

  -- form_link() stuff now done in tag_area and Vend::Util::vendURL,
     aliased to tag_area

  -- tag_page() calls tag_area to get URL

  -- [order ..] also calls tag_area

  -- Add three options to page/area/order:

         no_session      eliminates mv_session_id and mv_pc always
         link_relative   links relative to current page
         match_security  generates http:// on http:// page and
                         https:// on https:// page

   -- Allow override of Scratch url format options

         option                Scratch
         ---------------       -----------------
         no_session_id         mv_no_session_id
         no_count              mv_no_count
         add_dot_html          mv_add_dot_html
         add_source            mv_add_source

* Make static page generation work again

   -- Change call to Vend::SearchObject to proper $::Instance->{SearchObjec=
t}
   -- check arguments for flypage (will probably need to remove flylist)
   -- unhexify() the scan path

* Change auto_wizard tag to use new [table-editor] tag, remove abortive
  [table-editor-tpl].

* Passes all regression tests, fully builds standard Foundation static

Revision  Changes    Path
2.66      +0 -1      interchange/MANIFEST


rev 2.66, prev_rev 2.65
Index: MANIFEST
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/MANIFEST,v
retrieving revision 2.65
retrieving revision 2.66
diff -u -r2.65 -r2.66
--- MANIFEST	27 Sep 2002 07:16:44 -0000	2.65
+++ MANIFEST	5 Oct 2002 05:26:28 -0000	2.66
@@ -166,7 +166,6 @@
 code/UI_Tag/substitute_file.coretag
 code/UI_Tag/tabbed_display.coretag
 code/UI_Tag/table_editor.coretag
-code/UI_Tag/table_editor_tpl.coretag
 code/UI_Tag/uneval.coretag
 code/UI_Tag/unlink_file.coretag
 code/UI_Tag/version.coretag



1.3       +6 -3      interchange/code/SystemTag/order.coretag


rev 1.3, prev_rev 1.2
Index: order.coretag
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/code/SystemTag/order.coretag,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- order.coretag	6 Jun 2002 02:20:16 -0000	1.2
+++ order.coretag	5 Oct 2002 05:26:28 -0000	1.3
@@ -35,8 +35,11 @@
 	$opt->{page} =3D find_special_page('order')
 		unless $opt->{page};
=20
-	return form_link($opt->{page}, $opt->{arg}, $opt)
-		if $opt->{area};
-	return tag_page($opt->{page}, $opt->{arg}, $opt);
+	if ($opt->{area}) {
+		return tag_area($opt->{page}, $opt->{arg}, $opt);
+	}
+	else {
+		return tag_page($opt->{page}, $opt->{arg}, $opt);
+	}
 }
 EOR



1.5       +14 -19    interchange/code/UI_Tag/auto_wizard.coretag


rev 1.5, prev_rev 1.4
Index: auto_wizard.coretag
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/code/UI_Tag/auto_wizard.coretag,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- auto_wizard.coretag	13 Sep 2002 20:46:17 -0000	1.4
+++ auto_wizard.coretag	5 Oct 2002 05:26:29 -0000	1.5
@@ -413,27 +413,22 @@
 	$opts{defaults} =3D 1;
 	$opts{mv_cancelpage} ||=3D 'admin/index';
 	$opts{row_template} =3D <<'EOF';
-{HELP}    <td>&nbsp;</td>
-	<td class=3Dcdata>
-   <span style=3D"color: blue">$HELP$</span>
+{HELP?}<td>&nbsp;</td><td>
+     <span style=3D"color: blue">{HELP}</span>
+	 {HELP_URL?}<BR><A HREF=3D"{HELP_URL}">more help</A>{/HELP_URL?}
+	 </td>
+	</tr>
+    <tr class=3Drnorm>
+	{/HELP?}
+   <td class=3Dcdata width=3D"20%" valign=3Dtop>=20
+     {LABEL}
    </td>
-</tr>
-<tr class=3Drnorm>{/HELP}
-   <td class=3Dcdata width=3D"20%">=20
-     $BLABEL$$LABEL$$ELABEL$
-   </td>
-   <td class=3Dcdata>=20
-     <table cellspacing=3D0 cellmargin=3D0 width=3D"100%">
-       <tr>=20
-         <td class=3Dcwidget>=20
+   <td class=3Dcdata width=3D500>=20
            $WIDGET$
-         </td>
-         <td class=3Dchelp>~TKEY~{HELP_URL}<BR><A HREF=3D"$HELP_URL$">more=
 help</A>{/HELP_URL}</td>
-       </tr>
-     </table>
    </td>
-<tr class=3Drtitle>
-	<td colspan=3D2><img src=3D"bg.gif"></td>
+ </tr>
+ <tr class=3Drspacer>
+   <td colspan=3D2><img src=3D"bg.gif" height=3D1 width=3D1></td>
 EOF
=20
 	$opts{ui_wizard_fields} =3D join " ", @$name;
@@ -471,7 +466,7 @@
=20
 	delete $opts{type};
 #::logDebug("calling table_editor opts=3D" . ::uneval(\%opts));
-	$Tmp->{auto_wizard} =3D $Tag->table_editor_tpl( {all_opts =3D> \%opts });
+	$Tmp->{auto_wizard} =3D $Tag->table_editor( {all_opts =3D> \%opts });
 	if($Tmp->{auto_wizard} !~ /<form\s+/i) {
 		$attr{auto_wizard} .=3D "\n";
 		my $msg =3D errmsg("Auto wizard failed to run wizard %s.", $name);



1.2       +8 -4      interchange/code/UI_Tag/regenerate.coretag


rev 1.2, prev_rev 1.1
Index: regenerate.coretag
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/code/UI_Tag/regenerate.coretag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- regenerate.coretag	29 Jan 2002 05:52:40 -0000	1.1
+++ regenerate.coretag	5 Oct 2002 05:26:29 -0000	1.2
@@ -57,12 +57,14 @@
 		if $regen_arg;
=20
 	if($action eq 'scan') {
+#::logDebug("building scan");
 		$regen_scan =3D 1;
 		my $c =3D {};
-		::find_search_params($c, $path);
+		my $npath =3D Vend::Util::unhexify($path);
+		::find_search_params($c, $npath);
 		$c->{mv_more_id} =3D 'static';
-		$Vend::SearchObject{''} =3D perform_search($c);
-		$initial =3D $Vend::SearchObject{''}->{mv_search_page}
+		$::Instance->{SearchObject}{''} =3D perform_search($c);
+		$initial =3D $::Instance->{SearchObject}{''}->{mv_search_page}
 										|| find_special_page('search');
 	}
=20
@@ -253,7 +255,9 @@
 	$Vend::Cfg->{VendURL} =3D $Vend::Cfg->{VendURLOriginal};=20
=20
 	my $umask =3D umask(022);
-	my $statpath =3D 'http://' . $::Variable->{SERVER_NAME} . $Vend::Cfg->{St=
aticPath};
+	my $statpath =3D $Vend::Cfg->{StaticPath};
+	$statpath =3D 'http://' . $::Variable->{SERVER_NAME} . $statpath
+		unless $statpath =3D~ m{^http:/};
 	my @bad;
 	my $base =3D $Vend::Cfg->{StaticDir};
 	eval {



2.17      +9 -6      interchange/lib/Vend/DbSearch.pm


rev 2.17, prev_rev 2.16
Index: DbSearch.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/DbSearch.pm,v
retrieving revision 2.16
retrieving revision 2.17
diff -u -r2.16 -r2.17
--- DbSearch.pm	2 Aug 2002 03:04:53 -0000	2.16
+++ DbSearch.pm	5 Oct 2002 05:26:29 -0000	2.17
@@ -1,6 +1,6 @@
 # Vend::DbSearch - Search indexes with Interchange
 #
-# $Id: DbSearch.pm,v 2.16 2002/08/02 03:04:53 mheins Exp $
+# $Id: DbSearch.pm,v 2.17 2002/10/05 05:26:29 mheins Exp $
 #
 # Adapted for use with Interchange from Search::TextSearch
 #
@@ -26,7 +26,7 @@
=20
 @ISA =3D qw(Vend::Search);
=20
-$VERSION =3D substr(q$Revision: 2.16 $, 10);
+$VERSION =3D substr(q$Revision: 2.17 $, 10);
=20
 use Search::Dict;
 use strict;
@@ -84,10 +84,6 @@
 	$s->{mv_numeric}            =3D [];
 	$s->{mv_orsearch}           =3D [];
 	$s->{mv_search_field}       =3D [];
-	$s->{mv_search_file}        =3D	[ @{
-										$::Variable->{MV_DEFAULT_SEARCH_TABLE}
-										||	$Vend::Cfg->{ProductFiles}
-										} ];
 	$s->{mv_search_group}       =3D [];
 	$s->{mv_searchspec}         =3D [];
 	$s->{mv_sort_option}        =3D [];
@@ -96,6 +92,11 @@
 	for(keys %$options) {
 		$s->{$_} =3D $options->{$_};
 	}
+	$s->{mv_search_file}        =3D	[ @{
+										$::Variable->{MV_DEFAULT_SEARCH_TABLE}
+										||	$Vend::Cfg->{ProductFiles}
+										} ]
+		unless ref($s->{mv_search_file}) and scalar(@{$s->{mv_search_file}});
=20
 	return;
 }
@@ -104,7 +105,9 @@
 	my ($class, %options) =3D @_;
 	my $s =3D new Vend::Search;
 	bless $s, $class;
+#::logDebug("mv_search_file initted=3D" . ::uneval($options{mv_search_file=
}));
 	$s->init(\%options);
+#::logDebug("mv_search_file now=3D" . ::uneval($s->{mv_search_file}));
 	return $s;
 }
=20



2.116     +15 -64    interchange/lib/Vend/Interpolate.pm


rev 2.116, prev_rev 2.115
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.115
retrieving revision 2.116
diff -u -r2.115 -r2.116
--- Interpolate.pm	28 Sep 2002 04:27:01 -0000	2.115
+++ Interpolate.pm	5 Oct 2002 05:26:29 -0000	2.116
@@ -1,6 +1,6 @@
 # Vend::Interpolate - Interpret Interchange tags
 #=20
-# $Id: Interpolate.pm,v 2.115 2002/09/28 04:27:01 mheins Exp $
+# $Id: Interpolate.pm,v 2.116 2002/10/05 05:26:29 mheins Exp $
 #
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -27,7 +27,7 @@
 require Exporter;
 @ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.115 $, 10);
+$VERSION =3D substr(q$Revision: 2.116 $, 10);
=20
 @EXPORT =3D qw (
=20
@@ -3044,43 +3044,7 @@
 	return join $joiner, grep(defined $_, @args);
 }
=20
-sub form_link {
-	my ($href, $arg, $opt) =3D @_;
-
-	if( $href and $opt->{alias}) {
-		my $aloc =3D $opt->{once} ? 'one_time_path_alias' : 'path_alias';
-		$Vend::Session->{$aloc}{$href} =3D {}
-			if not defined $Vend::Session->{path_alias}{$href};
-		$Vend::Session->{$aloc}{$href} =3D $opt->{alias};
-	}
-
-	if($opt->{form} eq 'auto') {
-		my $form =3D '';
-		my %skip =3D qw/form 1 href 1 reparse 1/;
-		while( my ($k, $v) =3D each %$opt) {
-			next if $skip{$k};
-			$k =3D~ s/^__//;
-			$form .=3D "$k=3D$v\n";
-		}
-		$opt->{form} =3D $form;
-	}
-
-	$href =3D 'process' unless length($href);
-	$href =3D~ s:^/+::;
-	$href =3D Vend::Util::escape_chars_url($href);
-	$opt->{secure} =3D 1 if exists $Vend::Cfg->{AlwaysSecure}{$href};
-	my $base =3D ! $opt->{secure} ? ($Vend::Cfg->{VendURL}) : $Vend::Cfg->{Se=
cureURL};
-	$href =3D "$base/$href"     unless $href =3D~ /^\w+:/;
-
-	my $extra =3D '';
-	$extra .=3D "mv_session_id=3D$Vend::Session->{id}\n"
-		unless $::Scratch->{mv_force_cache};
-	$extra .=3D "mv_pc=3D" . ++$Vend::Session->{pageCount} . "\n"
-		unless $::Scratch->{mv_force_cache};
-	$arg =3D "mv_arg=3D$arg\n" if length($arg) && $arg !~ /\n/;=20
-	$extra .=3D $arg . $opt->{form};
-	return $href . '?' . escape_form($extra);
-}
+*form_link =3D \&tag_area;
=20
 PAGELINK: {
=20
@@ -3096,7 +3060,7 @@
 #::logDebug("have cookie...");
 	return if ! $Vend::Cfg->{Static};
 #::logDebug("are static...");
-	my $key =3D $page;
+	my $key =3D Vend::Util::escape_chars_url($page);
 	if($arg) {
 		my $tmp =3D $arg;
 		$tmp =3D~ s:([^\w/]): sprintf '%%%02x', ord($1) :eg;
@@ -3121,33 +3085,15 @@
 }
=20
 sub tag_page {
-    ($page, $arg, $opt) =3D @_;
+    my ($page, $arg, $opt) =3D @_;
+
+	my $url =3D tag_area(@_);
=20
 	my $extra;
 	if($extra =3D ($opt ||=3D {})->{extra} || '') {
 		$extra =3D~ s/^(\w+)$/class=3D$1/;
 		$extra =3D " $extra";
 	}
-
-	my $url;
-	my $urlroutine =3D $opt->{secure} ? \&secure_vendUrl : \&vendUrl;
-
-	if($opt->{form}) {
-		$url =3D form_link(@_);
-	}
-	elsif ($opt->{search}) {
-		$page =3D escape_scan($opt->{search});
-	}
-	elsif ($page eq 'scan') {
-		$page =3D escape_scan($arg);
-		undef $arg;
-	}
-
-	resolve_static(), $url =3D $urlroutine->($page, $arg)
-		unless $url;
-
-	$url .=3D '#' . $opt->{anchor} if $opt->{anchor};
-
     return qq{<a href=3D"$url"$extra>};
 }
=20
@@ -3156,10 +3102,15 @@
 sub tag_area {
     ($page, $arg, $opt) =3D @_;
=20
-	return form_link(@_) if defined $opt and $opt->{form};
-
 	$page =3D '' if ! defined $page;
=20
+	if( $page and $opt->{alias}) {
+		my $aloc =3D $opt->{once} ? 'one_time_path_alias' : 'path_alias';
+		$Vend::Session->{$aloc}{$page} =3D {}
+			if not defined $Vend::Session->{path_alias}{$page};
+		$Vend::Session->{$aloc}{$page} =3D $opt->{alias};
+	}
+
 	if ($opt->{search}) {
 		$page =3D escape_scan($opt->{search});
 	}
@@ -3180,7 +3131,7 @@
 	if($opt->{anchor}) {
 		$anchor =3D '#' . $opt->{anchor};
 	}
-	return $urlroutine->($page, $arg) . $anchor;
+	return $urlroutine->($page, $arg, undef, $opt) . $anchor;
 }
=20
 }



2.37      +72 -14    interchange/lib/Vend/Util.pm


rev 2.37, prev_rev 2.36
Index: Util.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.36
retrieving revision 2.37
diff -u -r2.36 -r2.37
--- Util.pm	16 Sep 2002 23:06:31 -0000	2.36
+++ Util.pm	5 Oct 2002 05:26:29 -0000	2.37
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.36 2002/09/16 23:06:31 mheins Exp $
+# $Id: Util.pm,v 2.37 2002/10/05 05:26:29 mheins Exp $
 #=20
 # Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
 #
@@ -83,7 +83,7 @@
 use Safe;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION =3D substr(q$Revision: 2.36 $, 10);
+$VERSION =3D substr(q$Revision: 2.37 $, 10);
=20
 BEGIN {
 	eval {
@@ -1232,11 +1232,21 @@
 # contains the session ID as well as a unique integer to avoid caching
 # of pages by the browser.
=20
+my @scratches =3D qw/
+				add_dot_html
+				add_source
+				link_relative
+				match_security
+				no_count
+				no_session_id
+				/;
+
 sub vendUrl {
-    my($path, $arguments, $r) =3D @_;
+    my($path, $arguments, $r, $opt) =3D @_;
     $r =3D $Vend::Cfg->{VendURL}
 		unless defined $r;
=20
+	my $secure;
 	my $can_cache =3D ! $Vend::Cfg->{NoCache}{$path};
 	my @parms;
=20
@@ -1244,27 +1254,70 @@
 		$r =3D $Vend::Cfg->{SecureURL};
 	}
=20
+	$opt ||=3D {};
+	for(@scratches) {
+		next if defined $opt->{$_};
+		my $mvparm =3D "mv_$_";
+		next unless $::Scratch->{$mvparm};
+		$opt->{$_} =3D $::Scratch->{$mvparm};
+	}
+
+	my $extra;
+	if($opt->{form}) {
+		$path =3D 'process' unless $path;
+		if($opt->{form} eq 'auto') {
+			my $form =3D '';
+			my %skip =3D qw/form 1 href 1 reparse 1/;
+			while( my ($k, $v) =3D each %$opt) {
+				next if $skip{$k};
+				$k =3D~ s/^__//;
+				$form .=3D "$k=3D$v\n";
+			}
+			$opt->{form} =3D $form;
+		}
+		push @parms, Vend::Interpolate::escape_form($opt->{form});
+	}
+
 	my($id, $ct);
 	$id =3D $Vend::SessionID
-		unless $can_cache and $Vend::Cookie && $::Scratch->{mv_no_session_id};
+		unless $can_cache and $Vend::Cookie && $opt->{no_session_id};
 	$ct =3D ++$Vend::Session->{pageCount}
 		unless $can_cache and $::Scratch->{mv_no_count};
=20
+	if($opt->{match_security}) {
+		$opt->{secure} =3D $CGI::secure;
+	}
+
+	if($opt->{no_session}) {
+		undef $id;
+		undef $ct;
+	}
+
+	if($opt->{link_relative}) {
+		my $cur =3D $Global::Variable->{MV_PAGE};
+		$cur =3D~ s{/[^/]+$}{}
+			and $path =3D "$cur/$path";
+	}
+
+	if($opt->{secure} or exists $Vend::Cfg->{AlwaysSecure}{$path}) {
+		$r =3D $Vend::Cfg->{SecureURL};
+	}
+
 	$path =3D escape_chars_url($path)
 		if $path =3D~ $need_escape;
     $r .=3D '/' . $path;
-	$r .=3D '.html' if $::Scratch->{mv_add_dot_html} and $r !~ /\.html?$/;
+	$r .=3D '.html' if $opt->{add_dot_html} and $r !~ /\.html?$/;
=20
-	if($::Scratch->{mv_add_source} and $Vend::Session->{source}) {
+	if($opt->{add_source} and $Vend::Session->{source}) {
 		my $sn =3D hexify($Vend::Session->{source});
 		push @parms, "$::VN->{mv_source}=3D$sn";
 	}
=20
-	push @parms, "$::VN->{mv_session_id}=3D$id"			 	if defined $id;
-	push @parms, "$::VN->{mv_arg}=3D" . hexify($arguments)	if defined $argume=
nts;
-	push @parms, "$::VN->{mv_pc}=3D$ct"                 	if defined $ct;
-	push @parms, "$::VN->{mv_cat}=3D$Vend::Cat"
-														if defined $Vend::VirtualCat;
+	push @parms, "$::VN->{mv_session_id}=3D$id"			 if $id;
+	push @parms, "$::VN->{mv_arg}=3D" . hexify($arguments) if defined $argume=
nts;
+	push @parms, "$::VN->{mv_pc}=3D$ct"                 	 if $ct;
+	push @parms, "$::VN->{mv_cat}=3D$Vend::Cat"            if $Vend::VirtualC=
at;
+
 	if($Vend::AccumulatingLinks) {
 		my $key =3D $path;
 		$key =3D~ s/\.html?$//;
@@ -1276,12 +1329,17 @@
 		push(@Vend::Links, [$key, $value]) unless $Vend::LinkFound{$key}++;
=20
 	}
-	return $r unless @parms;
-    return $r . '?' . join($Global::UrlJoiner, @parms);
+
+    $r .=3D '?' . join($Global::UrlJoiner, @parms) if @parms;
+	if($opt->{anchor}) {
+		$opt->{anchor} =3D~ s/^#//;
+		$r .=3D $opt->{anchor};
+	}
+	return $r;
 }=20
=20
 sub secure_vendUrl {
-	return vendUrl($_[0], $_[1], $Vend::Cfg->{SecureURL});
+	return vendUrl($_[0], $_[1], $Vend::Cfg->{SecureURL}, $_[3]);
 }
=20
 my %strip_vars;