[interchange-cvs] interchange - heins modified lib/Vend/Util.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Thu Jan 2 18:28:01 2003
User: heins
Date: 2003-01-02 23:27:07 GMT
Modified: lib/Vend Util.pm
Log:
* Fix link generation options so that $opt->{no_session_id} and
$Scratch->{mv_no_session_id} work as they should.
* Make sure unwanted form params don't show up when using form=auto.
Revision Changes Path
2.45 +10 -10 interchange/lib/Vend/Util.pm
rev 2.45, prev_rev 2.44
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.44
retrieving revision 2.45
diff -u -r2.44 -r2.45
--- Util.pm 18 Dec 2002 19:54:52 -0000 2.44
+++ Util.pm 2 Jan 2003 23:27:07 -0000 2.45
@@ -1,6 +1,6 @@
# Vend::Util - Interchange utility functions
#
-# $Id: Util.pm,v 2.44 2002/12/18 19:54:52 mheins Exp $
+# $Id: Util.pm,v 2.45 2003/01/02 23:27:07 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -85,7 +85,7 @@
use Safe;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.44 $, 10);
+$VERSION = substr(q$Revision: 2.45 $, 10);
BEGIN {
eval {
@@ -1240,8 +1240,6 @@
add_source
link_relative
match_security
- no_count
- no_session_id
/;
sub vendUrl {
@@ -1258,11 +1256,13 @@
}
$opt ||= {};
+ my %skip = qw/form 1 href 1 reparse 1/;
+
for(@scratches) {
next if defined $opt->{$_};
- my $mvparm = "mv_$_";
- next unless $::Scratch->{$mvparm};
- $opt->{$_} = $::Scratch->{$mvparm};
+ next unless defined $::Scratch->{"mv_$_"};
+ $skip{$_} = 1;
+ $opt->{$_} = $::Scratch->{"mv_$_"};
}
my $extra;
@@ -1270,7 +1270,6 @@
$path = 'process' unless $path;
if($opt->{form} eq 'auto') {
my $form = '';
- my %skip = qw/form 1 href 1 reparse 1/;
while( my ($k, $v) = each %$opt) {
next if $skip{$k};
$k =~ s/^__//;
@@ -1283,9 +1282,10 @@
my($id, $ct);
$id = $Vend::SessionID
- unless $opt->{no_session_id} or ($can_cache and $Vend::Cookie);
+ unless $opt->{no_session_id}
+ or ($Vend::Cookie and $can_cache and $::Scratch->{mv_no_session_id});
$ct = ++$Vend::Session->{pageCount}
- unless $opt->{no_count} or $can_cache;
+ unless $opt->{no_count} or ($can_cache && $::Scratch->{mv_no_count});
if($opt->{match_security}) {
$opt->{secure} = $CGI::secure;