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

(-)a/tools/picture-upload.pl (-2 / +2 lines)
Lines 50-56 my $cardnumber = $input->param('cardnumber'); Link Here
50
my $uploadfilename = $input->param('uploadfile');
50
my $uploadfilename = $input->param('uploadfile');
51
my $uploadfile     = $input->upload('uploadfile');
51
my $uploadfile     = $input->upload('uploadfile');
52
my $borrowernumber = $input->param('borrowernumber');
52
my $borrowernumber = $input->param('borrowernumber');
53
my $op             = $input->param('op');
53
my $op             = $input->param('op') || '';
54
54
55
#FIXME: This code is really in the rough. The variables need to be re-scoped as the two subs depend on global vars to operate.
55
#FIXME: This code is really in the rough. The variables need to be re-scoped as the two subs depend on global vars to operate.
56
#       Other parts of this code could be optimized as well, I think. Perhaps the file upload could be done with YUI's upload
56
#       Other parts of this code could be optimized as well, I think. Perhaps the file upload could be done with YUI's upload
Lines 230-235 sub handle_file { Link Here
230
    $debug and warn "Entering sub handle_file; passed \$cardnumber=$cardnumber, \$source=$source";
230
    $debug and warn "Entering sub handle_file; passed \$cardnumber=$cardnumber, \$source=$source";
231
    $count{filenames} = ()      if !$count{filenames};
231
    $count{filenames} = ()      if !$count{filenames};
232
    $count{source}    = $source if !$count{source};
232
    $count{source}    = $source if !$count{source};
233
    $count{count}     = 0       unless exists $count{count};
233
    my %filerrors;
234
    my %filerrors;
234
    my $filename;
235
    my $filename;
235
    if ( $filetype eq 'image' ) {
236
    if ( $filetype eq 'image' ) {
236
- 

Return to bug 9312