Bug 8035 - bibs with comments show an error in opac
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 9 May 2012 12:37:40 +0000 (08:37 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 14 May 2012 11:58:49 +0000 (13:58 +0200)
If a record has any approved comments, viewing the record
details in the opac will error out with the following
message:

Undefined subroutine &main::format_date called at
/home/load02/kohaclone/opac/opac-detail.pl line 654.

This is caused by a use of C4::Dates::format_date
without adding a use call to the head of the file.

Removing the call is the only change necessary. The
dates are already being filtered by $KohaDates.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
opac/opac-detail.pl

index afc9498..4d9879a 100755 (executable)
@@ -651,7 +651,6 @@ foreach ( @$reviews ) {
     }
     $_->{userid}    = $borrowerData->{'userid'};
     $_->{cardnumber}    = $borrowerData->{'cardnumber'};
-    $_->{datereviewed} = format_date($_->{datereviewed});
 
     if ($borrowerData->{'borrowernumber'} eq $borrowernumber) {
                $_->{your_comment} = 1;