Bugzilla – Attachment 11353 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.20 KB, created by
Dobrica Pavlinusic
on 2012-08-04 11:42:51 UTC
(
hide
)
Description:
Bug 8437: variable scoping for tools/export.pl
Filename:
MIME Type:
Creator:
Dobrica Pavlinusic
Created:
2012-08-04 11:42:51 UTC
Size:
2.20 KB
patch
obsolete
>From 900c189938e3367850a5f1465c4a857f2ee9a32e 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 > >Variable scoping problems prevented database export from working >under Plack. This patch fixes that. > >Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org> >--- > tools/export.pl | 7 +++++-- > 1 files changed, 5 insertions(+), 2 deletions(-) > >diff --git a/tools/export.pl b/tools/export.pl >index 95b8185..d863547 100755 >--- a/tools/export.pl >+++ b/tools/export.pl >@@ -128,8 +128,6 @@ if ( C4::Context->preference("IndependantBranches") && > $branch = C4::Context->userenv->{'branch'}; > } > >-my $backupdir = C4::Context->config('backupdir'); >- > if ($op eq "export") { > my $charset = 'utf-8'; > my $mimetype = 'application/octet-stream'; >@@ -277,6 +275,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" } ) >@@ -289,6 +288,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" } ) >@@ -384,6 +384,7 @@ if ($op eq "export") { > > else { > >+ my $backupdir = C4::Context->config('backupdir'); > my $itemtypes = GetItemTypes; > my @itemtypesloop; > foreach my $thisitemtype (sort keys %$itemtypes) { >@@ -445,6 +446,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