Bugzilla – Attachment 11177 Details for
Bug 8437
Large database backups and large exports from export.pl fail under plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8437: variable scoping for tools/export.pl
Bug-8437-variable-scoping-for-toolsexportpl.patch (text/plain), 2.18 KB, created by
Jared Camins-Esakov
on 2012-07-28 01:34:53 UTC
(
hide
)
Description:
Bug 8437: variable scoping for tools/export.pl
Filename:
MIME Type:
Creator:
Jared Camins-Esakov
Created:
2012-07-28 01:34:53 UTC
Size:
2.18 KB
patch
obsolete
>From 3f5a62dc7395d142684e0a7bdf6ce904b64e76cf Mon Sep 17 00:00:00 2001 >From: Jared Camins-Esakov <jcamins@cpbibliography.com> >Date: Fri, 27 Jul 2012 21:33:15 -0400 >Subject: [PATCH] Bug 8437: variable scoping for tools/export.pl >Content-Type: text/plain; charset="UTF-8" > >Variable scoping problems prevented database export from working >under Plack. This patch fixes that. >--- > tools/export.pl | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/tools/export.pl b/tools/export.pl >index d3ad16f..e20b8e1 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -59,8 +59,6 @@ my ($template, $loggedinuser, $cookie, $flags) > $branch = C4::Context->userenv->{'branch'}; > } > >-my $backupdir = C4::Context->config('backupdir'); >- > if ($op eq "export") { > my $charset = 'utf-8'; > my $mimetype = 'application/octet-stream'; >@@ -175,6 +173,7 @@ if ($op eq "export") { > } > } > elsif ( $record_type eq 'db' ) { >+ my $backupdir = C4::Context->config('backupdir'); > my $successful_export; > if ( $flags->{superlibrarian} && C4::Context->config('backup_db_via_tools') ) { > $successful_export = download_backup( { directory => "$backupdir", extension => 'sql', filename => "$filename" } ) >@@ -187,6 +186,7 @@ if ($op eq "export") { > exit; > } > elsif ( $record_type eq 'conf' ) { >+ my $backupdir = C4::Context->config('backupdir'); > my $successful_export; > if ( $flags->{superlibrarian} && C4::Context->config('backup_conf_via_tools') ) { > $successful_export = download_backup( { directory => "$backupdir", extension => 'tar', filename => "$filename" } ) >@@ -269,6 +269,7 @@ if ($op eq "export") { > > else { > >+ my $backupdir = C4::Context->config('backupdir'); > my $itemtypes = GetItemTypes; > my @itemtypesloop; > foreach my $thisitemtype (sort keys %$itemtypes) { >@@ -328,6 +329,8 @@ sub getbackupfilelist { > my $extension = $args->{extension}; > my @files; > >+ my $backupdir = C4::Context->config('backupdir'); >+ > if ( opendir(my $dir, $directory) ) { > while (my $file = readdir($dir)) { > next unless ( $file =~ m/\.$extension(\.(gz|bz2|xz))?/ ); >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8437
:
11177
|
11353
|
11354
|
11355
|
109632
|
112224
|
112448