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:
parent
516e76d1b5
commit
6ae8919e92
1 changed files with 0 additions and 34 deletions
34
C4/Items.pm
34
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<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';
|
||||
|
|
Loading…
Reference in a new issue