[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1034] branches/1.2/LedgerSMB/AM.pm



Revision: 1034
          http://svn.sourceforge.net/ledger-smb/?rev=1034&view=rev
Author:   linuxpoet
Date:     2007-04-06 15:27:58 -0700 (Fri, 06 Apr 2007)

Log Message:
-----------
Change pg_dump to use -Fc which is auto compressed, eliminating need for LedgerSMB::Gzip

Modified Paths:
--------------
    branches/1.2/LedgerSMB/AM.pm

Modified: branches/1.2/LedgerSMB/AM.pm
===================================================================
--- branches/1.2/LedgerSMB/AM.pm	2007-04-05 06:10:20 UTC (rev 1033)
+++ branches/1.2/LedgerSMB/AM.pm	2007-04-06 22:27:58 UTC (rev 1034)
@@ -1623,11 +1623,7 @@
 	my $suffix = "";
 
 	if ($form->{media} eq 'email') {
-		if (${LedgerSMB::Sysconfig::gzip}){
-			print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} $myconfig->{dbname} | ${LedgerSMB::Sysconfig::gzip}`;
-		} else {
-			print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} $myconfig->{dbname}`;
-		}
+		print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} -Fc $myconfig->{dbname}`;
 		close OUT;
 		use LedgerSMB::Mailer;
 		$mail = new Mailer;
@@ -1639,7 +1635,7 @@
 		$mail->{version} = $form->{version};
 		$mail->{fileid} = "$boundary.";
 		$mail->{format} = "plain";
-		$mail->{format} = "octet-stream" if ${LedgerSMB::Sysconfig::gzip};
+		$mail->{format} = "octet-stream";
 
 		$myconfig->{signature} =~ s/\\n/\n/g;
 		$mail->{message} = "-- \n$myconfig->{signature}";
@@ -1654,11 +1650,7 @@
 
 		print OUT qq|Content-Type: application/file;\n| .
 		qq|Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}-$t[5]$t[4]$t[3].sql$suffix"\n\n|;
-		if (${LedgerSMB::Sysconfig::gzip}){
-			print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} $myconfig->{dbname} | ${LedgerSMB::Sysconfig::gzip}`;
-		} else {
-			print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} $myconfig->{dbname}`;
-		}
+		print OUT `pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} -Fc $myconfig->{dbname}`;
 
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.