View | Details | Raw Unified | Return to bug 8437
Collapse All | Expand All

(-)a/tools/export.pl (-3 / +5 lines)
Lines 128-135 if ( C4::Context->preference("IndependantBranches") && Link Here
128
    $branch = C4::Context->userenv->{'branch'};
128
    $branch = C4::Context->userenv->{'branch'};
129
}
129
}
130
130
131
my $backupdir = C4::Context->config('backupdir');
132
133
if ($op eq "export") {
131
if ($op eq "export") {
134
    my $charset  = 'utf-8';
132
    my $charset  = 'utf-8';
135
    my $mimetype = 'application/octet-stream';
133
    my $mimetype = 'application/octet-stream';
Lines 277-282 if ($op eq "export") { Link Here
277
        }
275
        }
278
    }
276
    }
279
    elsif ( $record_type eq 'db' ) {
277
    elsif ( $record_type eq 'db' ) {
278
        my $backupdir = C4::Context->config('backupdir');
280
        my $successful_export;
279
        my $successful_export;
281
        if ( $flags->{superlibrarian} && C4::Context->config('backup_db_via_tools') ) {
280
        if ( $flags->{superlibrarian} && C4::Context->config('backup_db_via_tools') ) {
282
            $successful_export = download_backup( { directory => "$backupdir", extension => 'sql', filename => "$filename" } )
281
            $successful_export = download_backup( { directory => "$backupdir", extension => 'sql', filename => "$filename" } )
Lines 289-294 if ($op eq "export") { Link Here
289
        exit;
288
        exit;
290
    }
289
    }
291
    elsif ( $record_type eq 'conf' ) {
290
    elsif ( $record_type eq 'conf' ) {
291
        my $backupdir = C4::Context->config('backupdir');
292
        my $successful_export;
292
        my $successful_export;
293
        if ( $flags->{superlibrarian} && C4::Context->config('backup_conf_via_tools') ) {
293
        if ( $flags->{superlibrarian} && C4::Context->config('backup_conf_via_tools') ) {
294
            $successful_export = download_backup( { directory => "$backupdir", extension => 'tar', filename => "$filename" } )
294
            $successful_export = download_backup( { directory => "$backupdir", extension => 'tar', filename => "$filename" } )
Lines 384-389 if ($op eq "export") { Link Here
384
384
385
else {
385
else {
386
386
387
    my $backupdir = C4::Context->config('backupdir');
387
    my $itemtypes = GetItemTypes;
388
    my $itemtypes = GetItemTypes;
388
    my @itemtypesloop;
389
    my @itemtypesloop;
389
    foreach my $thisitemtype (sort keys %$itemtypes) {
390
    foreach my $thisitemtype (sort keys %$itemtypes) {
Lines 445-450 sub getbackupfilelist { Link Here
445
    my $extension = $args->{extension};
446
    my $extension = $args->{extension};
446
    my @files;
447
    my @files;
447
448
449
    my $backupdir = C4::Context->config('backupdir');
450
448
    if ( opendir(my $dir, $directory) ) {
451
    if ( opendir(my $dir, $directory) ) {
449
        while (my $file = readdir($dir)) {
452
        while (my $file = readdir($dir)) {
450
            next unless ( $file =~ m/\.$extension(\.(gz|bz2|xz))?/ );
453
            next unless ( $file =~ m/\.$extension(\.(gz|bz2|xz))?/ );
451
- 

Return to bug 8437