]> git.koha-community.org Git - koha.git/commit
Bug 15839: Koha::Reviews - Remove getreviews
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 Feb 2016 15:09:01 +0000 (15:09 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 10:29:53 +0000 (10:29 +0000)
commitba8f552ab605739ca9a9ea3a2c4c9d0a93871c96
tree700863814b3940333d564ee37fcd5cef2c61ba01
parent86395f2282f526ff51965e6a129c24b811dbbabd
Bug 15839: Koha::Reviews - Remove getreviews

The C4::Reviews::getreviews subroutine retrieved the reviews for a given
record, depending on their status.
This can be achieve with a call to Koha::Reviews->search.
There were 2 calls to this subroutine. The one from opac-ISBDdetail.pl
does not look in used: the reviews are not display on this page. It
certainly comes from an old copy/paste from opac-detail.pl.
The one from opac-detail only asked for the approved reviews. So the
logged in user does not see its own review if it is pending approval.
Actually this pending approval review is only displayed when the user
submits it (because of a unecessary complex text replacement done in
JS).
With this patch, the approved reviews AND the unaproved review from the
logged in user will be displayed.
It will allow a future enhancement to add a way to delete our own
reviews.

Moreover, the reviews were retrieved even if they were not displayed (if
reviewson is off), it's now fixed.

Signed-off-by: Marc Veron <veron@veron.ch>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Review.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt
opac/opac-ISBDdetail.pl
opac/opac-detail.pl