Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 05e0e8ca

Von Martin Helmling martin.helmling@octosoft.eu vor fast 8 Jahren hinzugefügt

  • ID 05e0e8ca1544e1ca706a99e51f9caf9a2f56f6af
  • Vorgänger 40ef8a72
  • Nachfolger 38fcf5b4

Anpassungen an neues SL::File::Object Interface

Unterschiede anzeigen:

SL/Controller/DownloadZip.pm
64 64
      # }
65 65
      if ( scalar (@wanted_files) > 0 ) {
66 66
        $zip->addDirectory($item->part->partnumber);
67
        $zip->addFile(SL::File->get_file_path(dbfile => $_ ),
68
                      Encode::encode($name_encoding,$item->part->partnumber.'/'.$_->{file_name})
69
                      ) for @wanted_files;
67
        $zip->addFile($_->get_file ), Encode::encode($name_encoding,$item->part->partnumber.'/'.$_->file_name)) for @wanted_files;
70 68
      }
71 69
    }
72 70
  }
......
118 116
    };
119 117
    if ( rowcount == 0 ) {
120 118
        kivi.display_flash('error', kivi.t8('No articles have been added yet.'));
121
        return false; 
119
        return false;
122 120
    }
123 121
    for (var i = 1; i <= rowcount; i++) {
124 122
        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 = SL::File->get_content(dbfile => $file) if $file;
72
    $ref = $file->get_content 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 => SL::File->get_file_path(dbfile => $attfile),
1215
      push @{ $mail->{attachments} }, { path => $attfile->get_file,
1216 1216
                                        id   => $attfile->id,
1217
                                        type => $attfile->file_mime_type,
1217
                                        type => $attfile->mime_type,
1218 1218
                                        name => $attfile->file_name };
1219 1219
    }
1220 1220
  }

Auch abrufbar als: Unified diff