From 6ae8919e9230b2327bbc690bfbce89c1c4c67ad5 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 6 Aug 2019 11:14:07 -0500 Subject: [PATCH] Bug 23463: Remove _mod_item_dates We did not do anything useful here. Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- C4/Items.pm | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index 632110ce69..d4f25a322a 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -1554,40 +1554,6 @@ sub DelItemCheck { return $status; } -=head2 _koha_modify_item - - my ($itemnumber,$error) =_koha_modify_item( $item ); - -Perform the actual update of the C row. Note that this -routine accepts a hashref specifying the columns to update. - -=cut - -sub _koha_modify_item { - my ( $item ) = @_; - my $dbh=C4::Context->dbh; - my $error; - - my $query = "UPDATE items SET "; - my @bind; - _mod_item_dates( $item ); - for my $key ( keys %$item ) { - next if ( $key eq 'itemnumber' ); - $query.="$key=?,"; - push @bind, $item->{$key}; - } - $query =~ s/,$//; - $query .= " WHERE itemnumber=?"; - push @bind, $item->{'itemnumber'}; - my $sth = $dbh->prepare($query); - $sth->execute(@bind); - if ( $sth->err ) { - $error.="ERROR in _koha_modify_item $query: ".$sth->errstr; - warn $error; - } - return ($item->{'itemnumber'},$error); -} - sub _mod_item_dates { # date formatting for date fields in item hash my ( $item ) = @_; return if !$item || ref($item) ne 'HASH'; -- 2.39.5