Script to control the guided report creation
-=over2
-
=cut
my $input = new CGI;
my $phase = $input->param('phase');
my $flagsrequired;
-if ( $phase eq 'Build new' ) {
- $flagsrequired = 'create_report';
+if ( $phase eq 'Build new' or $phase eq 'Delete Saved' ) {
+ $flagsrequired = 'create_reports';
}
elsif ( $phase eq 'Use saved' ) {
- $flagsrequired = 'execute_report';
+ $flagsrequired = 'execute_reports';
} else {
$flagsrequired = '*';
}
$query_criteria .= " AND $crit='$value'";
}
}
- warn $query_criteria;
}
$template->param(
}
my $totpages = int($total/$limit) + (($total % $limit) > 0 ? 1 : 0);
- my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&phase=Run%20this%20report";
+ my $url = "/cgi-bin/koha/reports/guided_reports.pl?reports=$report&phase=Run%20this%20report";
$template->param(
'results' => \@rows,
'sql' => $sql,