Initialized $op, and changed lines like "$op => 1" and
"$error => 1" into separate, conditional template param calls.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
if (!defined $op) {
$template_name = "tools/batchMod.tmpl";
$template_flag = { tools => '*' };
+ $op = q{};
} else {
$template_name = ($del) ? "tools/batchMod-del.tmpl" : "tools/batchMod-edit.tmpl";
$template_flag = ($del) ? { tools => 'items_batchdel' } : { tools => 'items_batchmod' };
$template->param(%$items_display_hashref) if $items_display_hashref;
$template->param(
op => $nextop,
- $op => 1,
);
+$template->param( $op => 1 ) if $op;
if ($op eq "action") {
}
foreach my $error (@errors) {
- $template->param($error => 1);
+ $template->param($error => 1) if $error;
}
$template->param(src => $src);
$template->param(biblionumber => $biblionumber);