[ic] Global option to eliminate session id *and* page
count fromURLs?
Kevin Walsh
kevin at cursor.biz
Thu Mar 24 02:08:46 EST 2005
Peter [peter at pajamian.dhs.org] wrote:
> On 03/23/05 08:21, Davor Ocelic wrote:
> > On Tue, 22 Mar 2005 20:01:29 -0800 Peter <peter at pajamian.dhs.org> wrote:
> > > I know about setting the scratch variable mv_no_session_id but that
> > > doesn't eliminate the page count (mv_pc). It appears that there is no
> > > global option to remove the page count from generated URLs. For now
> > > I've just tweaked Util.pm but it would be much nicer to have an option
> > > to set that won't dissapear the next time I upgrade the IC core.
> > >
> > ScratchDefault mv_no_count 1
> >
> > in your config file.
> >
> Where does it check for that? I can't see it in the vendUrl sub but I
> can see the check for mv_no_session_id.
>
Using 5.3 as a reference (probably the same or similar in earlier
versions), the vend::Util::vendUrl() subroutine has some code that
looks like this:
for(@scratches) {
next if defined $opt->{$_};
next unless defined $::Scratch->{"mv_$_"};
$skip{$_} = 1;
$opt->{$_} = $::Scratch->{"mv_$_"};
}
The "no_count" keyword is in the @scratches array, defined elsewhere
in the module. The above code will set $opt->{no_count} to equal
the value of $::Scratch->{mv_no_count} which, in turn, will be
influenced by the ScratchDefault mv_no_count (if set).
Later in the subroutine, we see this:
$ct = ++$Vend::Session->{pageCount}
unless $opt->{no_count};
if($opt->{no_session}) {
undef $id;
undef $ct;
}
If $ct survives the "no_session" check, it will be appended to the
generated URI parameters as follows:
push @parms, "$::VN->{mv_pc}=$ct" if $ct;
I hope that explains things.
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users
mailing list