]> git.koha-community.org Git - koha.git/commit
Bug 15839: Koha::Reviews - Add Koha::Review[s] classes
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 16 Feb 2016 16:41:22 +0000 (16:41 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 10:29:31 +0000 (10:29 +0000)
commit86395f2282f526ff51965e6a129c24b811dbbabd
treec464cc4840c304d2628054eb63bb1baace5bef2f
parentac13b03ff21e169b492a260a3eced21500c43fd2
Bug 15839: Koha::Reviews - Add Koha::Review[s] classes

The subroutines in C4::Reviews are only doing CRUD operations.
This patch set moves them to 2 new Koha::Review[s] classes.

Test plan for the whole patch set:
0/ Set the reviewson syspref
1/ At the OPAC, create a couple of reviews for a record
Try and create a review without html tags different that br b i em big
small strong: You should get a warning.
2/ Edit a review
3/ On the Staff interface, you should see a "Comments pending approval"
link on the mainpage
4/ Approve 1 review and delete the other
5/ At the OPAC you should only see 1 review (the approved one) in the
"Comments" tab
6/ Modify the review
7/ The review should appear again in the "comments awaiting moderation"
tab.
Note that even the comment has not been changed, it will have to be
reapproved (FIXME later). This behavior already existed prior to this
patch.

Tested all patches together (with database updated)
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>
Koha/Review.pm [new file with mode: 0644]
Koha/Reviews.pm [new file with mode: 0644]
t/db_dependent/Koha/Reviews.t [new file with mode: 0644]