Bug 41798: Fix FTP passive mode not saving and add display indicator

The FTP passive mode setting was not being saved due to a typo in the
parameter name ('passiv' instead of 'passive'). This fixes the typo
and adds display of passive mode status in the transports table.

Test plan:
1. Go to Administration > File transports
2. Click "New file transport"
3. Fill in the name (e.g., "Test FTP")
4. Change Transport to "FTP"
5. Set Passive mode to "Enabled (Recommended)"
6. Fill in required fields (host, username, etc.) and save
7. Edit the transport you just created
8. Verify Passive mode is still set to "Enabled" (not reverted to Disabled)
9. Return to the file transports list
10. Verify the Transport column shows "FTP (passive)" for this transport
11. Edit the transport and change Passive mode to "Disabled"
12. Save and return to the list
13. Verify the Transport column now shows just "FTP" (without the passive indicator)

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2026-02-09 11:55:19 +00:00 committed by Lucas Gass
parent fd7cab9c41
commit a92e6ef8ea
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 7 additions and 3 deletions

View File

@ -49,7 +49,7 @@ if ( $op eq 'cud-add' ) {
my $host = $input->param('host') || 'localhost';
my $port = $input->param('port') || 22;
my $transport = $input->param('transport') || 'sftp';
my $passive = ( scalar $input->param('passiv') ) ? 1 : 0;
my $passive = ( scalar $input->param('passive') ) ? 1 : 0;
my $auth_mode = $input->param('auth_mode') || 'password';
my $user_name = $input->param('user_name') || undef;
my $password = $input->param('password') || undef;
@ -139,7 +139,7 @@ if ( $op eq 'cud-add' ) {
my $host = $input->param('host') || 'localhost';
my $port = $input->param('port') || 22;
my $transport = $input->param('transport') || 'sftp';
my $passive = ( scalar $input->param('passiv') ) ? 1 : 0;
my $passive = ( scalar $input->param('passive') ) ? 1 : 0;
my $auth_mode = $input->param('auth_mode') || 'password';
my $user_name = $input->param('user_name') || undef;
my $password = $input->param('password') || undef;

View File

@ -502,7 +502,11 @@
{
"data": "transport",
"render": function(data, type, row, meta) {
return data.toUpperCase();
var transport = data.toUpperCase();
if (data == "ftp" && row.passive == 1) {
transport += " [% tp('FTP connection mode', '(passive)') %]";
}
return transport;
},
"searchable": true,
"orderable": false