Bugzilla – Attachment 163173 Details for
Bug 36305
Inventory tools need adjustments for CSRF
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36305: (QA follow-up) Enforce op values in script
Bug-36305-QA-follow-up-Enforce-op-values-in-script.patch (text/plain), 2.88 KB, created by
Marcel de Rooy
on 2024-03-15 08:27:09 UTC
(
hide
)
Description:
Bug 36305: (QA follow-up) Enforce op values in script
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-15 08:27:09 UTC
Size:
2.88 KB
patch
obsolete
>From 04129e983afc2e1207fb14bb018e351e70873942 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 15 Mar 2024 08:15:03 +0000 >Subject: [PATCH] Bug 36305: (QA follow-up) Enforce op values in script >Content-Type: text/plain; charset=utf-8 > >Replacing a FIXME by TODO along the way. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > tools/inventory.pl | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/tools/inventory.pl b/tools/inventory.pl >index a76beb6be4..e38d7c4b65 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -55,7 +55,7 @@ my $ignore_waiting_holds = $input->param('ignore_waiting_holds'); > my $datelastseen = $input->param('datelastseen'); # last inventory date > my $branchcode = $input->param('branchcode') || ''; > my $branch = $input->param('branch'); >-my $op = $input->param('op'); >+my $op = $input->param('op') // q{}; > my $compareinv2barcd = $input->param('compareinv2barcd'); > my $dont_checkin = $input->param('dont_checkin'); > my $out_of_order = $input->param('out_of_order'); >@@ -162,7 +162,9 @@ my $results = {}; > my @scanned_items; > my @errorloop; > my $moddatecount = 0; >-if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length($barcodelist) > 0) ) { >+if ( $op eq 'cud-inventory' >+ && ( ( $uploadbarcodes && length($uploadbarcodes) > 0 ) || ( $barcodelist && length($barcodelist) > 0 ) ) ) >+{ > my $dbh = C4::Context->dbh; > my $date = $input->param('setdate'); > my $date_dt = dt_from_string($date); >@@ -228,8 +230,8 @@ if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length > $moddatecount++; > unless ( $dont_checkin ) { > if ( $item->onloan ){ >- #FIXME Is this correct? Shouldn't the item be checked in at the branch we are signed in at? >- my ($doreturn, $messages, $iteminformation, $borrower) =AddReturn($barcode, $item->homebranch); >+ #TODO Assuming item homebranch for return here. Might allow current branch too? >+ my ($doreturn, $messages, $iteminformation, $borrower) = AddReturn($barcode, $item->homebranch); > if( $doreturn ) { > $item_unblessed->{onloan} = undef; > $item_unblessed->{datelastseen} = dt_from_string; >@@ -250,7 +252,7 @@ if ( ($uploadbarcodes && length($uploadbarcodes) > 0) || ($barcodelist && length > # Build inventorylist: used as result list when you do not pass barcodes > # This list is also used when you want to compare with barcodes > my ( $inventorylist, $rightplacelist ); >-if ( $op && ( !$uploadbarcodes || $compareinv2barcd )) { >+if ( $op eq 'cud-inventory' && ( !$uploadbarcodes || $compareinv2barcd )) { > ( $inventorylist ) = GetItemsForInventory({ > minlocation => $minlocation, > maxlocation => $maxlocation, >-- >2.30.2
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 36305
:
163114
|
163115
|
163153
|
163154
|
163171
|
163172
| 163173