Bug 18942: Simplify syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jonathan Druart 2017-07-17 13:48:17 -03:00
parent d2d784a917
commit 14d5311794

View file

@ -917,11 +917,8 @@ sub CanUserUseBudget {
if (not ref $borrower) { if (not ref $borrower) {
$borrower = Koha::Patrons->find( $borrower ); $borrower = Koha::Patrons->find( $borrower );
if ( $borrower ) { return 0 unless $borrower;
$borrower = $borrower->unblessed; $borrower = $borrower->unblessed;
} else {
return 0;
}
} }
if (not ref $budget) { if (not ref $budget) {
$budget = GetBudget($budget); $budget = GetBudget($budget);
@ -1005,11 +1002,8 @@ sub CanUserModifyBudget {
if (not ref $borrower) { if (not ref $borrower) {
$borrower = Koha::Patrons->find( $borrower ); $borrower = Koha::Patrons->find( $borrower );
if ( $borrower ) { return 0 unless $borrower;
$borrower = $borrower->unblessed; $borrower = $borrower->unblessed;
} else {
return 0;
}
} }
if (not ref $budget) { if (not ref $budget) {
$budget = GetBudget($budget); $budget = GetBudget($budget);