Revision 38fcf5b4
Von Bernd Bleßmann vor fast 8 Jahren hinzugefügt
SL/Controller/DownloadZip.pm | ||
---|---|---|
64 | 64 |
# } |
65 | 65 |
if ( scalar (@wanted_files) > 0 ) { |
66 | 66 |
$zip->addDirectory($item->part->partnumber); |
67 |
$zip->addFile($_->get_file ), Encode::encode($name_encoding,$item->part->partnumber.'/'.$_->file_name)) for @wanted_files; |
|
67 |
$zip->addFile(SL::File->get_file_path(dbfile => $_ ), |
|
68 |
Encode::encode($name_encoding,$item->part->partnumber.'/'.$_->{file_name}) |
|
69 |
) for @wanted_files; |
|
68 | 70 |
} |
69 | 71 |
} |
70 | 72 |
} |
... | ... | |
116 | 118 |
}; |
117 | 119 |
if ( rowcount == 0 ) { |
118 | 120 |
kivi.display_flash('error', kivi.t8('No articles have been added yet.')); |
119 |
return false; |
|
121 |
return false;
|
|
120 | 122 |
} |
121 | 123 |
for (var i = 1; i <= rowcount; i++) { |
122 | 124 |
data['parts_id_'+i] = $('#id_' + i).val(); |
SL/Controller/EmailJournal.pm | ||
---|---|---|
69 | 69 |
my $ref = \$attachment->content; |
70 | 70 |
if ( $attachment->file_id > 0 ) { |
71 | 71 |
my $file = SL::File->get(id => $attachment->file_id ); |
72 |
$ref = $file->get_content if $file;
|
|
72 |
$ref = SL::File->get_content(dbfile => $file) if $file;
|
|
73 | 73 |
} |
74 | 74 |
$self->send_file($ref, name => $attachment->name, type => $attachment->mime_type); |
75 | 75 |
} |
SL/Form.pm | ||
---|---|---|
1212 | 1212 |
} |
1213 | 1213 |
} |
1214 | 1214 |
foreach my $attfile ( @attfiles ) { |
1215 |
push @{ $mail->{attachments} }, { path => $attfile->get_file,
|
|
1215 |
push @{ $mail->{attachments} }, { path => SL::File->get_file_path(dbfile => $attfile),
|
|
1216 | 1216 |
id => $attfile->id, |
1217 |
type => $attfile->mime_type, |
|
1217 |
type => $attfile->file_mime_type,
|
|
1218 | 1218 |
name => $attfile->file_name }; |
1219 | 1219 |
} |
1220 | 1220 |
} |
Auch abrufbar als: Unified diff
Revert "Anpassungen an neues SL::File::Object Interface"
This reverts commit 05e0e8ca1544e1ca706a99e51f9caf9a2f56f6af.
Diese Änderung fügt einen Syntax-Fehler ein:
syntax error at /home/bernd/kivi/SL/Controller/DownloadZip.pm line 67, near ")) "
/home/bernd/kivi/SL/Controller/DownloadZip.pm had compilation errors.