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:
parent
d2d784a917
commit
14d5311794
1 changed files with 4 additions and 10 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue