Bugzilla – Attachment 53803 Details for
Bug 15839
Move the reviews related code to Koha::Reviews
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15839: Koha::Reviews - Remove savereview
Bug-15839-KohaReviews---Remove-savereview.patch (text/plain), 2.24 KB, created by
Marcel de Rooy
on 2016-07-29 09:44:48 UTC
(
hide
)
Description:
Bug 15839: Koha::Reviews - Remove savereview
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-07-29 09:44:48 UTC
Size:
2.24 KB
patch
obsolete
>From 59b99a5990424f1e1fa3b6a276adf2d2ad203cea Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Feb 2016 16:30:07 +0000 >Subject: [PATCH] Bug 15839: Koha::Reviews - Remove savereview >Content-Type: text/plain; charset=utf-8 > >Signed-off-by: Marc Veron <veron@veron.ch> >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Review.pm | 18 ------------------ > opac/opac-review.pl | 13 +++++++++---- > 2 files changed, 9 insertions(+), 22 deletions(-) > >diff --git a/C4/Review.pm b/C4/Review.pm >index 90bdfeb..dd5fdaa 100644 >--- a/C4/Review.pm >+++ b/C4/Review.pm >@@ -47,24 +47,6 @@ Review.pm provides many routines for manipulating reviews. > > =head1 FUNCTIONS > >-=head2 savereview >- >- savereview($biblionumber,$borrowernumber, $review); >- >-Save a review in the 'reviews' database >- >-=cut >- >-sub savereview { >- my ( $biblionumber, $borrowernumber, $review ) = @_; >- my $dbh = C4::Context->dbh; >- my $query = "INSERT INTO reviews (borrowernumber,biblionumber, >- review,approved,datereviewed) VALUES >- (?,?,?,0,now())"; >- my $sth = $dbh->prepare($query); >- $sth->execute( $borrowernumber, $biblionumber, $review ); >-} >- > =head2 numberofreviewsbybiblionumber > > my $count=numberofreviewsbybiblionumber($biblionumber); >diff --git a/opac/opac-review.pl b/opac/opac-review.pl >index a965896..917036b 100755 >--- a/opac/opac-review.pl >+++ b/opac/opac-review.pl >@@ -22,11 +22,11 @@ use CGI qw ( -utf8 ); > use C4::Auth; > use C4::Koha; > use C4::Output; >-use C4::Review; > use C4::Biblio; > use C4::Scrubber; > use C4::Debug; > use Koha::DateUtils; >+use Koha::Review; > use Koha::Reviews; > > my $query = new CGI; >@@ -69,9 +69,14 @@ if (defined $review) { > datereviewed => dt_from_string > } > )->store; >- } else { >- savereview($biblionumber, $borrowernumber, $clean); >- } >+ } else { >+ Koha::Review->new( >+ { biblionumber => $biblionumber, >+ borrowernumber => $borrowernumber, >+ review => $clean, >+ } >+ )->store; >+ } > unless (@errors){ $template->param(WINDOW_CLOSE=>1); } > } > } >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15839
:
48166
|
48167
|
48168
|
48169
|
48170
|
48171
|
48172
|
48173
|
48174
|
48175
|
48176
|
48280
|
48281
|
48282
|
48283
|
48284
|
48285
|
48286
|
48287
|
48288
|
48289
|
48290
|
51197
|
51198
|
51199
|
51200
|
51201
|
51202
|
51203
|
51204
|
51205
|
51206
|
51207
|
53794
|
53795
|
53796
|
53797
|
53798
|
53799
|
53800
|
53801
|
53802
| 53803 |
53804
|
53805
|
53806
|
53807