src/strip.vala
[app.mailtrimmer] / src / strip.vala
index f8589ac..06b068a 100644 (file)
@@ -476,7 +476,8 @@ public class Strip : GLib.Object {
                                    mime_size ,
                                    filesize,
                                    
-                                   checksum
+                                   checksum,
+                                   created
 
                                ) VALUES (
                                        %d,  -- id
@@ -487,15 +488,16 @@ public class Strip : GLib.Object {
                                    '%s',  -- mimetype
                                    
                                    '%s', -- stored file anme
-                                   '',
+                                   '', -- charset
                                    'attachment',
                                    0,
                                    0,
                                    0,
                                    %d, -- size
                                    %d, -- size
-                                   '%s' -- checkum
-
+                                   
+                                   '%s', -- checkum
+                                       '%s' --created:
                                )"
                       
                       
@@ -505,22 +507,21 @@ public class Strip : GLib.Object {
                                      this.mysql_escape(filename),
                                  this.mysql_escape(mime_type),
                                  this.mysql_escape(file_path),
-                                       file_size
-                                     file_size
+                                       file_size,
+                                     file_size,
                                      this.mysql_escape(chksum),
-             file_size
+                                       this.created_date
                         ));
-                        
+             // this is done to fix the queue_id or maillog_id ??
                 this.query("""
                  SELECT attachment_update(
                       %d, -- in_id INT(11),
-                      '%s', -- in_mime_type varchar(255),
+                                               '', -- mime type
                       '%s', -- in_created DATETIME,
                       '%s' -- in_mailfort_sig varchar(64)
                  )
              """.printf(
-                               id,
-                       "", // this will be ignored..
+                               id, 
                                this.created_date,
                                this.mysql_escape(this.active_message_x_mailfort_sig)