Bugzilla – Attachment 186856 Details for
Bug 38115
Add FTP support to export_records.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38115: (follow-up) Update terminology from SFTP/FTP to file transport
Bug-38115-follow-up-Update-terminology-from-SFTPFT.patch (text/plain), 4.26 KB, created by
Martin Renvoize (ashimema)
on 2025-09-24 06:22:05 UTC
(
hide
)
Description:
Bug 38115: (follow-up) Update terminology from SFTP/FTP to file transport
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-09-24 06:22:05 UTC
Size:
4.26 KB
patch
obsolete
>From e508b19490440deaa6335cbf0d884424b3d27d43 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tom=C3=A1s=20Cohen=20Arazi?= <tomascohen@theke.io> >Date: Thu, 18 Sep 2025 16:49:31 -0300 >Subject: [PATCH] Bug 38115: (follow-up) Update terminology from SFTP/FTP to > file transport > >This follow-up patch updates the terminology in export_records.pl to use >generic 'file transport' language instead of specific 'FTP/SFTP' references, >aligning with the recent renaming of the underlying classes to File::Transports. > >Changes: >- Replace $sftp_server variable with $file_transport for clarity >- Update error messages to use 'file transport server' terminology >- Fix incorrect error message for report_id validation >- Update POD documentation to reference 'file transport servers' >- Maintain consistency with the renamed admin interface and API > >This ensures the script terminology matches the current class structure >and admin interface naming conventions. > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > misc/export_records.pl | 31 ++++++++++++++++--------------- > 1 file changed, 16 insertions(+), 15 deletions(-) > >diff --git a/misc/export_records.pl b/misc/export_records.pl >index 5789006bce4..6b0044a5bb9 100755 >--- a/misc/export_records.pl >+++ b/misc/export_records.pl >@@ -124,12 +124,12 @@ if ( $deleted_barcodes and $record_type ne 'bibs' ) { > pod2usage(q|--deleted_barcodes can only be used with biblios|); > } > >-my $sftp_server; >+my $file_transport; > if ($destination_server_id) { >- $sftp_server = Koha::File::Transports->find($destination_server_id); >+ $file_transport = Koha::File::Transports->find($destination_server_id); > >- pod2usage( sprintf( "No FTP/SFTP Server (%s) found", $destination_server_id ) ) >- unless $sftp_server; >+ pod2usage( sprintf( "No file transport server (%s) found", $destination_server_id ) ) >+ unless $file_transport; > } > > if ($report_id) { >@@ -137,7 +137,7 @@ if ($report_id) { > # Check report exists > $report = Koha::Reports->find($report_id); > unless ($report) { >- pod2usage( sprintf( "No FTP/SFTP Server (%s) found", $report_id ) ); >+ pod2usage( sprintf( "No saved report (%s) found", $report_id ) ); > } > $sql = $report->savedsql; > >@@ -354,17 +354,18 @@ if ($deleted_barcodes) { > ); > } > >-if ($sftp_server) { >- $sftp_server->connect >+if ($file_transport) { >+ $file_transport->connect > or die pod2usage( sprintf( "Unable to connect server (%s)", $destination_server_id ) ); > >- my $upload_dir = $sftp_server->upload_directory; >+ my $upload_dir = $file_transport->upload_directory; > if ($upload_dir) { >- $sftp_server->change_directory( $upload_dir ) >- or die pod2usage( sprintf( "Unable to change directory on server (%s) to path (%s)", $destination_server_id, $upload_dir ) ); >+ $file_transport->change_directory($upload_dir) >+ or die pod2usage( >+ sprintf( "Unable to change directory on server (%s) to path (%s)", $destination_server_id, $upload_dir ) ); > } > >- $sftp_server->upload_file ( $filename, $filename ) >+ $file_transport->upload_file( $filename, $filename ) > or die pod2usage( sprintf( "Unable to upload file (%s) to server (%s)", $filename, $destination_server_id ) ); > } > >@@ -519,15 +520,15 @@ Print a brief help message. > =item B<--destination_server_id> > > --destination_server_id=ID Provide this option, along with the destination server ID, to >- upload the resultant mrc file to the selected FTP/SFTP Server. >- You can create FTP/SFTP Servers via the Koha Staff client, under >+ upload the resultant mrc file to the selected file transport server. >+ You can create file transport servers via the Koha Staff client, under > Koha Administration. > > =item B<--delete_local_after_run> > > --delete_local_after_run Deletes the local file at the end of the script run. Can be >- useful if, for example, you are uploading the file to an >- FTP/SFTP server. >+ useful if, for example, you are uploading the file to a >+ file transport server. > > =back > >-- >2.51.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38115
:
178781
|
186589
|
186590
|
186855
| 186856 |
186857