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

(-)a/Koha/Edifact/Transport.pm (+4 lines)
Lines 136-145 sub sftp_download { Link Here
136
    # C = ready to retrieve E = Edifact
136
    # C = ready to retrieve E = Edifact
137
    my $msg_hash = $self->message_hash();
137
    my $msg_hash = $self->message_hash();
138
    my @downloaded_files;
138
    my @downloaded_files;
139
    my $port = $self->{account}->download_port ? $self->{account}->download_port : '22';
139
    my $sftp = Net::SFTP::Foreign->new(
140
    my $sftp = Net::SFTP::Foreign->new(
140
        host     => $self->{account}->host,
141
        host     => $self->{account}->host,
141
        user     => $self->{account}->username,
142
        user     => $self->{account}->username,
142
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
143
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
144
        port     => $port,
143
        timeout  => 10,
145
        timeout  => 10,
144
    );
146
    );
145
    if ( $sftp->error ) {
147
    if ( $sftp->error ) {
Lines 293-302 sub ftp_upload { Link Here
293
295
294
sub sftp_upload {
296
sub sftp_upload {
295
    my ( $self, @messages ) = @_;
297
    my ( $self, @messages ) = @_;
298
    my $port = $self->{account}->upload_port ? $self->{account}->upload_port : '22';
296
    my $sftp = Net::SFTP::Foreign->new(
299
    my $sftp = Net::SFTP::Foreign->new(
297
        host     => $self->{account}->host,
300
        host     => $self->{account}->host,
298
        user     => $self->{account}->username,
301
        user     => $self->{account}->username,
299
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
302
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
303
        port     => $port,
300
        timeout  => 10,
304
        timeout  => 10,
301
    );
305
    );
302
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
306
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
(-)a/admin/edi_accounts.pl (+2 lines)
Lines 79-84 else { Link Here
79
            host               => scalar $input->param('host'),
79
            host               => scalar $input->param('host'),
80
            username           => scalar $input->param('username'),
80
            username           => scalar $input->param('username'),
81
            password           => $password,
81
            password           => $password,
82
            upload_port        => scalar $input->param('upload_port'),
83
            download_port      => scalar $input->param('download_port'),
82
            vendor_id          => scalar $input->param('vendor_id'),
84
            vendor_id          => scalar $input->param('vendor_id'),
83
            upload_directory   => scalar $input->param('upload_directory'),
85
            upload_directory   => scalar $input->param('upload_directory'),
84
            download_directory => scalar $input->param('download_directory'),
86
            download_directory => scalar $input->param('download_directory'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt (-1 / +4 lines)
Lines 313-318 Link Here
313
       <th>Remote host</th>
313
       <th>Remote host</th>
314
       <th>Username</th>
314
       <th>Username</th>
315
       <th>Password</th>
315
       <th>Password</th>
316
       <th>Upload port</th>
317
       <th>Download port</th>
316
       <th>Download directory</th>
318
       <th>Download directory</th>
317
       <th>Upload directory</th>
319
       <th>Upload directory</th>
318
       <th>Qualifier</th>
320
       <th>Qualifier</th>
Lines 334-339 Link Here
334
      <td>[% account.host | html %]</td>
336
      <td>[% account.host | html %]</td>
335
      <td>[% account.username | html %]</td>
337
      <td>[% account.username | html %]</td>
336
      <td>[% IF account.password %]*****[% END %]</td>
338
      <td>[% IF account.password %]*****[% END %]</td>
339
      <td>[% account.upload_port | html %]</td>
340
      <td>[% account.download_port | html %]</td>
337
      <td>[% account.download_directory | html %]</td>
341
      <td>[% account.download_directory | html %]</td>
338
      <td>[% account.upload_directory | html %]</td>
342
      <td>[% account.upload_directory | html %]</td>
339
      <td>
343
      <td>
340
- 

Return to bug 35724