[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3305] branches/1.2/LedgerSMB/AM.pm
- Subject: SF.net SVN: ledger-smb:[3305] branches/1.2/LedgerSMB/AM.pm
- From: ..hidden..
- Date: Mon, 20 Jun 2011 23:48:45 +0000
Revision: 3305
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3305&view=rev
Author: einhverfr
Date: 2011-06-20 23:48:45 +0000 (Mon, 20 Jun 2011)
Log Message:
-----------
Correcting file name on backup file
Modified Paths:
--------------
branches/1.2/LedgerSMB/AM.pm
Modified: branches/1.2/LedgerSMB/AM.pm
===================================================================
--- branches/1.2/LedgerSMB/AM.pm 2011-06-20 20:55:19 UTC (rev 3304)
+++ branches/1.2/LedgerSMB/AM.pm 2011-06-20 23:48:45 UTC (rev 3305)
@@ -1627,9 +1627,10 @@
$t[3] = substr( "0$t[3]", -2 );
$t[4] = substr( "0$t[4]", -2 );
+ my $globalDBname = $myconfig->{dbname};
my $boundary = time;
my $tmpfile =
-"${LedgerSMB::Sysconfig::backuppath}/$boundary.$globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sql";
+"${LedgerSMB::Sysconfig::backuppath}/$boundary.$globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc";
$form->{OUT} = "$tmpfile";
open( OUT, '>:raw', "$form->{OUT}" ) or $form->error("$form->{OUT} : $!");
@@ -1638,8 +1639,6 @@
my $today = scalar localtime;
- # compress backup if gzip defined
- my $suffix = "c";
if ( $form->{media} eq 'email' ) {
print OUT
@@ -1651,7 +1650,7 @@
$mail->{to} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
$mail->{subject} =
-"LedgerSMB Backup / $globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sql$suffix";
+"LedgerSMB Backup / $globalDBname-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc";
@{ $mail->{attachments} } = ($tmpfile);
$mail->{version} = $form->{version};
$mail->{fileid} = "$boundary.";
@@ -1671,7 +1670,7 @@
binmode( OUT, ':raw' );
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|;
+ . qq|Content-Disposition: attachment; filename="$myconfig->{dbname}-$form->{dbversion}-$t[5]$t[4]$t[3].sqlc"\n\n|;
print OUT
qx(PGPASSWORD="$myconfig->{dbpasswd}" pg_dump -U $myconfig->{dbuser} -h $myconfig->{dbhost} -Fc -p $myconfig->{dbport} $myconfig->{dbname});
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.