summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authorlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-06 22:27:58 +0000
committerlinuxpoet <linuxpoet@4979c152-3d1c-0410-bac9-87ea11338e46>2007-04-06 22:27:58 +0000
commit7afe2ed70e210a9e7c13dae2b3d417a7e6a45655 (patch)
treeaa24524cffdf407fdd5509be00f0b47489df8ec8 /LedgerSMB
parentffaf164f06011f2c3200b9db34ab570deaeac7bd (diff)
Change pg_dump to use -Fc which is auto compressed, eliminating need for LedgerSMB::Gzip
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1034 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/AM.pm14
1 files changed, 3 insertions, 11 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm
index fb4794f4..aea71518 100755
--- a/LedgerSMB/AM.pm
+++ b/LedgerSMB/AM.pm
@@ -1623,11 +1623,7 @@ sub backup {
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 @@ sub backup {
$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 @@ sub backup {
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}`;
}