[siesta-commit] siesta/lib/Siesta Message.pm,1.28,1.29 Plugin.pm,1.25,1.26

[prev] [thread] [next] [lurker] [Date index for 2002/09/20]

From: muttley
Subject: [siesta-commit] siesta/lib/Siesta Message.pm,1.28,1.29 Plugin.pm,1.25,1.26
Date: 14:29 on 20 Sep 2002
Update of /cvsroot/siesta/siesta/lib/Siesta
In directory usw-pr-cvs1:/tmp/cvs-serv4423/lib/Siesta

Modified Files:
	Message.pm Plugin.pm 
Log Message:
Subscribe now challenges the user with a unique number.


Index: Message.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Message.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Message.pm	18 Sep 2002 09:26:58 -0000	1.28
+++ Message.pm	20 Sep 2002 13:29:38 -0000	1.29
@@ -39,7 +39,7 @@
 sub reply {
     my $self  = shift;
     my %args  = @_;
-    my $clone = dclone($self);
+    my $clone = $self->clone();
 
     if ( exists $args{body} ) {
         $clone->body( [ map { "$_\n" } split /\n/, $args{'body'} ] );
@@ -70,4 +70,9 @@
     $self->send( to => $to );
 }
 
+sub clone
+{
+	my $self = shift;
+	return dclone($self);
+}
 1;

Index: Plugin.pm
===================================================================
RCS file: /cvsroot/siesta/siesta/lib/Siesta/Plugin.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Plugin.pm	17 Sep 2002 12:45:17 -0000	1.25
+++ Plugin.pm	20 Sep 2002 13:29:38 -0000	1.26
@@ -48,6 +48,28 @@
     return Siesta->storage->config( $package, $user_id, $list_id, @_ );
 }
 
+
+=item ->delete_config($message, $key)
+
+Deletes this particular config value from the database.
+
+=cut
+
+sub delete_config
+{
+
+   my $self = shift;
+    my $mail = shift;
+
+    ( my $package = ref $self ) =~ s!^.*::!!;
+
+    my $list_id = defined $mail->list ? $mail->list->id() : undef;
+    my $user_id = defined $mail->user ? $mail->user->id() : undef;
+
+    return Siesta->storage->delete_config( $package, $user_id, $list_id, @_ );
+}
+
+
 =item ->options()
 
 Returns a hashref, the keys of which are the various config options a



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52