Bug 23463: Remove _mod_item_dates

We did not do anything useful here.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Jonathan Druart 2019-08-06 11:14:07 -05:00 committed by Martin Renvoize
parent 516e76d1b5
commit 6ae8919e92
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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<items> 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';