From e4abc27635b591ddaf0b08f5457a7f41b4de8a9d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 9 Feb 2024 07:45:33 +0000 Subject: [PATCH] Bug 34478: Changes for offline_circ Removed an unused form from process_koc.tt and an unused op from process_koc.pl. Signed-off-by: Jonathan Druart --- .../prog/en/modules/offline_circ/process_koc.tt | 9 ++------- offline_circ/enqueue_koc.pl | 5 +++-- offline_circ/process_koc.pl | 4 +--- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt index de45fcdc7d..272c51081b 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/offline_circ/process_koc.tt @@ -72,6 +72,7 @@
[% INCLUDE 'csrf-token.inc' %] +
  1. @@ -88,16 +89,10 @@ [% INCLUDE 'csrf-token.inc' %] + -
  2. - -
    - [% INCLUDE 'csrf-token.inc' %] - - -
    [% END %] diff --git a/offline_circ/enqueue_koc.pl b/offline_circ/enqueue_koc.pl index e10df9545d..7e1745008a 100755 --- a/offline_circ/enqueue_koc.pl +++ b/offline_circ/enqueue_koc.pl @@ -46,12 +46,13 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ flagsrequired => { circulate => "circulate_remaining_permissions" }, }); -my $fileID=$query->param('uploadedfileid'); +my $fileID = $query->param('uploadedfileid'); +my $op = $query->param('op') // q{}; ## 'Local' globals. our $dbh = C4::Context->dbh(); -if ($fileID) { +if ( $op eq 'cud-enqueue' && $fileID ) { my $upload = Koha::UploadedFiles->find($fileID); my $fh = $upload? $upload->file_handle: undef; my @input_lines = $fh? <$fh>: (); diff --git a/offline_circ/process_koc.pl b/offline_circ/process_koc.pl index 2630e677cc..84d714fb35 100755 --- a/offline_circ/process_koc.pl +++ b/offline_circ/process_koc.pl @@ -57,9 +57,7 @@ my $sessionID = $cookies{'CGISESSID'}->value; our $dbh = C4::Context->dbh(); our @output = (); ## For storing messages to be displayed to the user -if ( $op eq 'add_to_queue' ) { - $template->param(transactions_loaded => 1); -} elsif ($fileID) { +if ( $op eq 'cud-upload' && $fileID ) { my $upload = Koha::UploadedFiles->find( $fileID ); my $fh = $upload? $upload->file_handle: undef; my $filename = $upload? $upload->filename: undef; -- 2.39.5