projects
/
koha_gimpoz
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 6086 follow-up Uppercase initial coding guideline fix
[koha_gimpoz]
/
admin
/
branches.pl
diff --git
a/admin/branches.pl
b/admin/branches.pl
index
f4bcf66
..
12c49e2
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 );
}
@@
-256,15
+254,15
@@
sub editbranchform {
#
# We export a "categoryloop" array to the template, each element of which
# contains separate 'categoryname', 'categorycode', 'codedescription', and
#
# 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 $catinfo = GetBranchCategory();
my @categoryloop = ();
foreach my $cat (@$catinfo) {
- my $checked
= ""
;
+ my $checked;
my $tmp = quotemeta( $cat->{'categorycode'} );
if ( grep { /^$tmp$/ } @{ $data->{'categories'} } ) {
my $tmp = quotemeta( $cat->{'categorycode'} );
if ( grep { /^$tmp$/ } @{ $data->{'categories'} } ) {
- $checked =
"checked=\"checked\""
;
+ $checked =
1
;
}
push @categoryloop, {
categoryname => $cat->{'categoryname'},
}
push @categoryloop, {
categoryname => $cat->{'categoryname'},
@@
-343,7
+341,7
@@
sub branchinfotable {
for my $field (
'branchaddress1', 'branchaddress2',
'branchaddress3', 'branchzip',
for my $field (
'branchaddress1', 'branchaddress2',
'branchaddress3', 'branchzip',
- 'branchcity', 'branchcountry',
+ 'branchcity', 'branch
state', 'branch
country',
'branchphone', 'branchfax',
'branchemail', 'branchurl',
'branchip', 'branchprinter', 'branchnotes'
'branchphone', 'branchfax',
'branchemail', 'branchurl',
'branchip', 'branchprinter', 'branchnotes'
@@
-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,
@@
-402,6
+400,7
@@
sub _branch_to_template {
branchaddress3 => $data->{'branchaddress3'},
branchzip => $data->{'branchzip'},
branchcity => $data->{'branchcity'},
branchaddress3 => $data->{'branchaddress3'},
branchzip => $data->{'branchzip'},
branchcity => $data->{'branchcity'},
+ branchstate => $data->{'branchstate'},
branchcountry => $data->{'branchcountry'},
branchphone => $data->{'branchphone'},
branchfax => $data->{'branchfax'},
branchcountry => $data->{'branchcountry'},
branchphone => $data->{'branchphone'},
branchfax => $data->{'branchfax'},