[prev] [thread] [next] [lurker] [Date index for 2002/10/17]
Update of /cvsroot/siesta/siesta/lib/Siesta/Plugin In directory usw-pr-cvs1:/tmp/cvs-serv10970/lib/Siesta/Plugin Modified Files: ReplyTo.pm SimpleSig.pm Subscribe.pm Log Message: Chnage to a new Preference based structure. This cleans up Storage and its derivatives. One less item on the todo list. Index: ReplyTo.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/ReplyTo.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ReplyTo.pm 10 Sep 2002 18:24:10 -0000 1.4 +++ ReplyTo.pm 17 Oct 2002 11:52:18 -0000 1.5 @@ -23,7 +23,7 @@ my $list = $mail->list || undef; my $post_address = ( defined $list ) ? $mail->list->post_address : undef; - my $munge = $self->config( $mail, 'munge' ) + my $munge = $self->preference( $mail, 'munge' ) || $self->options->{munge}->{default}; $munge = ( defined $post_address ) ? $munge : 0; Index: SimpleSig.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/SimpleSig.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- SimpleSig.pm 10 Sep 2002 18:24:13 -0000 1.13 +++ SimpleSig.pm 17 Oct 2002 11:52:18 -0000 1.14 @@ -16,7 +16,7 @@ # some sort of configuration lookup based on list and this plugin name, # however lets just say 5 instead - my $maxlines = $self->config( $mail, 'maxlines' ) + my $maxlines = $self->preference( $mail, 'maxlines' ) || $self->options->{maxlines}->{default}; my $body = join '', @{ $mail->body() }; Index: Subscribe.pm =================================================================== RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin/Subscribe.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Subscribe.pm 10 Oct 2002 12:58:49 -0000 1.14 +++ Subscribe.pm 17 Oct 2002 11:52:18 -0000 1.15 @@ -31,7 +31,7 @@ # now check to see if there's a key for them $mail->user($user); - my $value = $self->config( $mail, 'request' ); + my $value = $self->preference( $mail, 'request' ); # and get the value from subject my ($sub) = $mail->subject =~ /SUBSCRIBE\s+(.+)/; @@ -68,7 +68,7 @@ # get the time a month ago my $date = time() - ( 60 * 60 * 24 * 31 ); - # $self->delete_config($clone, 'request', $date); + # $self->delete_preference($clone, 'request', $date); # TODO } @@ -82,7 +82,7 @@ my $user = $mail->user; # delete the key already in the db - $self->delete_config( $mail, 'request' ); + $self->delete_preference( $mail, 'request' ); # add the user to the list and if that fails, send an error # TODO should this be a seperate send method? @@ -152,7 +152,7 @@ # generate a unique value my $value = md5_hex( $$ . time() . {} . rand() ); - $self->config( $mail, 'request', $value ); + $self->preference( $mail, 'request', $value ); # mail them with a a request $mail->subject("SUBSCRIBE $value");
Generated at 13:57 on 01 Jul 2004 by mariachi 0.52