|
Lines 790-796
if ( $op eq 'run' ) {
Link Here
|
| 790 |
my $want_full_chart = $input->param('want_full_chart') || 0; |
790 |
my $want_full_chart = $input->param('want_full_chart') || 0; |
| 791 |
|
791 |
|
| 792 |
my @duplicate_running_report_ids; |
792 |
my @duplicate_running_report_ids; |
| 793 |
if ( C4::Context->userenv ) { |
793 |
my $duplicate_running_reports_per_user_limit = C4::Context->config('duplicate_running_reports_per_user_limit'); |
|
|
794 |
if ( $duplicate_running_reports_per_user_limit && C4::Context->userenv ) { |
| 794 |
my $user_id = C4::Context->userenv ? C4::Context->userenv->{number} : undef; |
795 |
my $user_id = C4::Context->userenv ? C4::Context->userenv->{number} : undef; |
| 795 |
@duplicate_running_report_ids = Koha::Reports->running( { report_id => $report_id, user_id => $user_id } ); |
796 |
@duplicate_running_report_ids = Koha::Reports->running( { report_id => $report_id, user_id => $user_id } ); |
| 796 |
} |
797 |
} |
|
Lines 979-985
if ( $op eq 'run' ) {
Link Here
|
| 979 |
'id' => $report_id, |
980 |
'id' => $report_id, |
| 980 |
'template_id' => $template_id, |
981 |
'template_id' => $template_id, |
| 981 |
); |
982 |
); |
| 982 |
} elsif (@duplicate_running_report_ids) { |
983 |
} elsif ( $duplicate_running_reports_per_user_limit |
|
|
984 |
&& ( scalar @duplicate_running_report_ids >= $duplicate_running_reports_per_user_limit ) ) |
| 985 |
{ |
| 983 |
$template->param( |
986 |
$template->param( |
| 984 |
'sql' => $sql, |
987 |
'sql' => $sql, |
| 985 |
'original_sql' => $original_sql, |
988 |
'original_sql' => $original_sql, |
| 986 |
- |
|
|