/[smeserver]/rpms/perl-CGI-Persistent/sme8/perl-CGI-Persistent-0.22.patch.2002081600
ViewVC logotype

Annotation of /rpms/perl-CGI-Persistent/sme8/perl-CGI-Persistent-0.22.patch.2002081600

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sun Nov 25 23:18:30 2007 UTC (16 years, 6 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Import on branch sme8 of package perl-CGI-Persistent-1.00-2.0.1.el5.sme.src.rpm

1 slords 1.1 Index: formmagick/lib/CGI/Persistent.pm
2     diff -u formmagick/lib/CGI/Persistent.pm:1.1.1.1 formmagick/lib/CGI/Persistent.pm:1.2
3     --- formmagick/lib/CGI/Persistent.pm:1.1.1.1 Mon Jul 22 13:42:19 2002
4     +++ formmagick/lib/CGI/Persistent.pm Fri Aug 16 14:34:05 2002
5     @@ -14,22 +14,25 @@
6     use Persistence::Object::Simple;
7     use vars qw(@ISA $VERSION);
8     use Data::Dumper;
9     -@ISA = qw( CGI ); ( $VERSION ) = '$Revision: 0.22 $' =~ /(\d+\.\d+)/;
10     +use File::Basename;
11     +@ISA = qw( CGI ); ( $VERSION ) = '$Revision: 0.22 $' =~ /(\d+\.\d+)/;
12    
13     sub new {
14    
15     my ( $class, $dope, $id ) = @_ ;
16     $dope = "." unless $dope;
17     my $cgi = new CGI; # print $cgi->header ();
18     - my $fn = $cgi->param( '.id' ) || $id;
19     + $cgi->{sessiondir} = dirname($id) if $id;
20     + my $fn = basename($cgi->param( '.id' ) || $id);
21    
22     unless ( $fn ) {
23     my $po = new Persistence::Object::Simple ( __Dope => $dope );
24     - $cgi->append( -name => '.id', -values => $po->{ __Fn } );
25     - $fn = $po->{ __Fn }; undef $po;
26     + $cgi->append( -name => '.id', -values => basename $po->{ __Fn } );
27     + $fn = basename $po->{ __Fn }; undef $po;
28     }
29    
30     - my $po = new Persistence::Object::Simple __Fn => $fn;
31     + my $po = new Persistence::Object::Simple __Fn =>
32     + join "/", ($cgi->{sessiondir},$fn);
33     $po->{ __DOPE } = undef;
34     my @names = $cgi->param ();
35    
36     @@ -51,7 +54,7 @@
37     sub delete {
38    
39     my ( $self, $param ) = @_;
40     - my $fn = $self->param( '.id' );
41     + my $fn = join "/", ($self->{sessiondir},$self->param( '.id' ));
42     my $po = new Persistence::Object::Simple __Fn => $fn;
43     delete $po->{ $param }; $po->commit ();
44     $self->SUPER::delete ( $param ); # delete, is like, overloaded.
45     @@ -61,7 +64,7 @@
46     sub delete_all {
47    
48     my ( $self ) = shift;
49     - $fn = $self->param( '.id' );
50     + $fn = join "/", ($self->{sessiondir},$self->param( '.id' ));
51     my $po = new Persistence::Object::Simple __Fn => $fn;
52     $po->expire;
53     $self->SUPER::delete_all ();
54     @@ -99,7 +102,7 @@
55    
56     }
57    
58     -"True Value";
59     +1;
60    
61     =head1 NAME
62    
63    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed