X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=admin%2Fbranches.pl;h=12c49e28ba3dbd80b4e3a0d6ed9bc27241495992;hb=5d5c4a67ec5c91770583edb38ce0213dfa6119c7;hp=5c71b0c4ce51160dc242de57f821581767df239e;hpb=77167b3b17690ccff682d410847b13aa5ac186e8;p=koha.git diff --git a/admin/branches.pl b/admin/branches.pl index 5c71b0c4ce..12c49e28ba 100755 --- 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. - my $message = "MESSAGE8" if CheckBranchCategorycode($categorycode); - if ($message) { + if ( CheckBranchCategorycode($categorycode) ) { $template->param( else => 1 ); - default($message,$template); - } - else { + default( 'MESSAGE8', $template ); + } else { $template->param( delete_category => 1 ); $template->param( categorycode => $categorycode ); } @@ -256,15 +254,15 @@ sub editbranchform { # # We export a "categoryloop" array to the template, each element of which # contains separate 'categoryname', 'categorycode', 'codedescription', and - # 'checked' fields. The $checked field is either '' or 'checked="checked"' + # 'checked' fields. The $checked field is either empty or 1' my $catinfo = GetBranchCategory(); my @categoryloop = (); foreach my $cat (@$catinfo) { - my $checked = ""; + my $checked; my $tmp = quotemeta( $cat->{'categorycode'} ); if ( grep { /^$tmp$/ } @{ $data->{'categories'} } ) { - $checked = "checked=\"checked\""; + $checked = 1; } push @categoryloop, { categoryname => $cat->{'categoryname'},