From ebb0bf9c12443d73241bc3502a83d7f8eb23e477 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 26 May 2017 13:44:26 -0400 Subject: [PATCH] Bug 1985: perltidy Koha/Review.pm --- Koha/Review.pm | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Koha/Review.pm b/Koha/Review.pm index 97fa682..b031215 100644 --- a/Koha/Review.pm +++ b/Koha/Review.pm @@ -43,7 +43,7 @@ Approve a review =cut sub approve { - my ( $self ) = @_; + my ($self) = @_; $self->approved(1)->store; } @@ -56,7 +56,7 @@ Unapprove a review =cut sub unapprove { - my ( $self ) = @_; + my ($self) = @_; $self->approved(0)->store; } @@ -81,36 +81,38 @@ sub send_review_alert { my ( $self, $params ) = @_; my $borrowernumber = $params->{borrowernumber}; - my $reviewid = $params->{reviewid}; - my $biblionumber = $params->{biblionumber}; + my $reviewid = $params->{reviewid}; + my $biblionumber = $params->{biblionumber}; my $moderator_email = C4::Context->preference('CommentModeratorsEmail'); - if (!$moderator_email) { + if ( !$moderator_email ) { carp 'CommentModeratorsEmail is not set!'; return; } - my $letter = C4::Letters::GetPreparedLetter ( - module => 'members', + my $letter = C4::Letters::GetPreparedLetter( + module => 'members', letter_code => 'COMMENT_CREATED', - tables => { + tables => { 'reviews' => $reviewid, 'borrowers' => $borrowernumber, 'biblio' => $biblionumber, 'biblioitems' => $biblionumber, } ); - if (!$letter) { + if ( !$letter ) { carp 'COMMENT_CREATED member letter not found!'; return; } - C4::Letters::EnqueueLetter({ - letter => $letter, - borrowernumber => $borrowernumber, - message_transport_type => 'email', - to_address => $moderator_email, - }); + C4::Letters::EnqueueLetter( + { + letter => $letter, + borrowernumber => $borrowernumber, + message_transport_type => 'email', + to_address => $moderator_email, + } + ); return 1; } -- 2.1.4