[vhffs-dev] [464] Merging of vhffs_ml_prefs into vhffs_ml done

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 464
Author:   gradator
Date:     2007-02-16 22:44:42 +0000 (Fri, 16 Feb 2007)

Log Message:
-----------
Merging of vhffs_ml_prefs into vhffs_ml done

Modified Paths:
--------------
    branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm


Modified: branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm
===================================================================
--- branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-02-16 21:29:45 UTC (rev 463)
+++ branches/vhffs_4.1/vhffs-api/src/Vhffs/Services/Mailing.pm	2007-02-16 22:44:42 UTC (rev 464)
@@ -130,15 +130,10 @@
     $ml_id++;
     
     #Finally, create the object in the database
-    $query = "INSERT INTO vhffs_ml VALUES( '".$ml_id."' , '".$self->{'local_part'} . "', '".$self->{'domain'}."' , '".$self->{'local_part'} . "' , '".$self->{'user'}->get_uid."' , '".$self->{'group'}->get_gid."', '$oid'  )";
+    $query = "INSERT INTO vhffs_ml VALUES( '".$ml_id."' , '".$self->{'local_part'} . "', '".$self->{'domain'}."' , '".$self->{'local_part'} . "' , '".$self->{'user'}->get_uid."' , '".$self->{'group'}->get_gid."', '".$oid."'  , '".$self->{'admin'} . "' ,  'f' , 'f' , 't' ,  't' , 'f' , ''  )";
     $request = $self->{'db'}->prepare( $query );
     $request->execute or return -2;
 
-
-    $query = "INSERT INTO vhffs_ml_prefs VALUES( '".$ml_id."' , '".$self->{'admin'} . "' ,  '0' , '0' , '1' ,  '1' , '0' , ''  )";
-    $request = $self->{'db'}->prepare( $query );
-    $request->execute or return -2;
-
     return $ml_id;
 }
 
@@ -165,20 +160,8 @@
     }
 
     #Fetch the object part( SUPER class)
-    return -2 if ($self->SUPER::fetch < 0 ); 
+    return -2 if ($self->SUPER::fetch < 0 );
 
-
-    $query = "SELECT * FROM vhffs_ml_prefs where ml_id='".$self->{'ml_id'}."'";
-    $request = $self->{'db'}->prepare( $query ) or return -1;
-    $request->execute() or return -3;
-    $result = $request->fetchrow_hashref();
-
-    foreach ( keys %{$result} )
-    {
-	$self->{$_} = $result->{$_}
-    }
-
-
     $query = "SELECT * FROM vhffs_ml_subscribers where ml_id='".$self->{'ml_id'}."'";
     $request = $self->{'db'}->prepare( $query ) or return -1;
     $request->execute() or return -3;
@@ -203,17 +186,10 @@
 
     my( $request , $result , $rows , $query , $name , $password);
 
-#	$self->{'catchall'} = "" if( ! defined $self->{'catchall'} );
-
-    $query = "UPDATE vhffs_ml SET prefix='".$self->{'prefix'}."' WHERE ml_id='".$self->{'ml_id'}."'";
+    $query = "UPDATE vhffs_ml SET prefix='".$self->{'prefix'}."' , admin='".$self->{'admin'}."' , open_post='".$self->{'open_post'}."', open_archive='".$self->{'open_archive'}."' , reply_to='".$self->{'reply_to'}. "', moderated='".$self->{moderated}."' , open_sub='".$self->{'open_sub'}."' WHERE ml_id='".$self->{'ml_id'}."'";
     $request = $self->{'db'}->prepare( $query );
     $request->execute;
 
-    $query = "UPDATE vhffs_ml_prefs SET admin='".$self->{'admin'}."' , open_post='".$self->{'open_post'}."', open_archive='".$self->{'open_archive'}."' , reply_to='".$self->{'reply_to'}. "', moderated='".$self->{moderated}."' , open_sub='".$self->{'open_sub'}."'  WHERE ml_id='".$self->{'ml_id'}."'";
-    $request = $self->{'db'}->prepare( $query );
-    $request->execute;
-
-
     return -3 if( $self->SUPER::commit < 0 );
 
     return 1;
@@ -403,11 +379,6 @@
     $request = $self->{'db'}->prepare( $query );
     $request->execute or return -1;
 
-    $query = "DELETE FROM vhffs_ml_prefs  WHERE ml_id='".$self->{'ml_id'}."'";
-    $request = $self->{'db'}->prepare( $query );
-    $request->execute or return -1;
-
-
     $query = "DELETE FROM vhffs_ml WHERE ml_id='".$self->{'ml_id'}."'";
     $request = $self->{'db'}->prepare( $query );
     $request->execute or return -1;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/