[interchange-cvs] interchange - heins modified 2 files
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Tue Aug 27 12:53:02 2002
User: heins
Date: 2002-08-27 16:52:07 GMT
Modified: scripts interchange.PL
Modified: lib/Vend Util.pm
Log:
* Add mv_source parameter which sets an affiliate program source
and can be carried around in URLs when $Scratch->{mv_add_source}
is set. This solves the problem of AOL caching the page with
the source embedded, then forwarding the next request sans source.
From a suggestion by Dan <ic@concolor.org>.
Revision Changes Path
2.52 +6 -3 interchange/scripts/interchange.PL
rev 2.52, prev_rev 2.51
Index: interchange.PL
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=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/scripts/interchange.PL,v
retrieving revision 2.51
retrieving revision 2.52
diff -u -r2.51 -r2.52
--- interchange.PL 15 Aug 2002 20:18:48 -0000 2.51
+++ interchange.PL 27 Aug 2002 16:52:06 -0000 2.52
@@ -3,7 +3,7 @@
#
# Interchange version 4.9.3
#
-# $Id: interchange.PL,v 2.51 2002/08/15 20:18:48 mheins Exp $
+# $Id: interchange.PL,v 2.52 2002/08/27 16:52:06 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. and others.
# http://www.icdevgroup.org/
@@ -2228,11 +2228,14 @@
}
=20
$Vend::Session->{'arg'} =3D $Vend::Argument =3D ($CGI::values{mv_arg} || =
undef);
-#::logDebug("arg is $Vend::Session->{arg}");
+
if ($CGI::values{mv_pc} =3D~ /\D/) {
- $Vend::Session->{'source'} =3D $CGI::values{mv_pc} eq 'RESET'
+ $Vend::Session->{source} =3D $CGI::values{mv_pc} eq 'RESET'
? ''
: $CGI::values{mv_pc};
+ }
+ elsif($CGI::values{mv_source}) {
+ $Vend::Session->{source} =3D $CGI::values{mv_source};
}
=20
$Vend::Session->{'user'} =3D $CGI::user;
2.34 +8 -2 interchange/lib/Vend/Util.pm
rev 2.34, prev_rev 2.33
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.33
retrieving revision 2.34
diff -u -r2.33 -r2.34
--- Util.pm 15 Aug 2002 16:30:34 -0000 2.33
+++ Util.pm 27 Aug 2002 16:52:07 -0000 2.34
@@ -1,6 +1,6 @@
# Vend::Util - Interchange utility functions
#
-# $Id: Util.pm,v 2.33 2002/08/15 16:30:34 mheins Exp $
+# $Id: Util.pm,v 2.34 2002/08/27 16:52:07 mheins Exp $
#=20
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -82,7 +82,7 @@
use Safe;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION =3D substr(q$Revision: 2.33 $, 10);
+$VERSION =3D substr(q$Revision: 2.34 $, 10);
=20
BEGIN {
eval {
@@ -1245,6 +1245,12 @@
if $path =3D~ $need_escape;
$r .=3D '/' . $path;
$r .=3D '.html' if $::Scratch->{mv_add_dot_html} and $r !~ /\.html?$/;
+
+ if($::Scratch->{mv_add_source} and $Vend::Session->{source}) {
+ my $sn =3D hexify($Vend::Session->{source});
+ push @parms, "$::VN->{mv_source}=3D$sn";
+ }
+
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;