projects
/
koha_gimpoz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 5453: Move declarations out of conditionals
[koha_gimpoz]
/
admin
/
branches.pl
diff --git
a/admin/branches.pl
b/admin/branches.pl
index
d8fa236
..
d6388f5
100755
(executable)
--- a/
admin/branches.pl
+++ b/
admin/branches.pl
@@
-189,12
+189,10
@@
elsif ( $op eq 'addcategory_validate' ) {
elsif ( $op eq 'delete_category' ) {
# if the user has pressed the "delete branch" button.
elsif ( $op eq 'delete_category' ) {
# if the user has pressed the "delete branch" button.
- my $message = "MESSAGE8" if CheckBranchCategorycode($categorycode);
- if ($message) {
+ if ( CheckBranchCategorycode($categorycode) ) {
$template->param( else => 1 );
$template->param( else => 1 );
- default($message,$template);
- }
- else {
+ default( 'MESSAGE8', $template );
+ } else {
$template->param( delete_category => 1 );
$template->param( categorycode => $categorycode );
}
$template->param( delete_category => 1 );
$template->param( categorycode => $categorycode );
}
@@
-383,7
+381,7
@@
sub branchinfotable {
categorytype => $cat->{'categorytype'},
};
}
categorytype => $cat->{'categorytype'},
};
}
- push @branchcategories, { categorytype => $ctype , $ctype => 1 , catloop =>
\@categories
};
+ push @branchcategories, { categorytype => $ctype , $ctype => 1 , catloop =>
( @categories ? \@categories : undef)
};
}
$innertemplate->param(
branches => \@loop_data,
}
$innertemplate->param(
branches => \@loop_data,