View | Details | Raw Unified | Return to bug 41918
Collapse All | Expand All

(-)a/debian/templates/koha-conf-site.xml.in (+3 lines)
Lines 340-345 __END_SRU_PUBLICSERVER__ Link Here
340
 <plack_max_requests>50</plack_max_requests>
340
 <plack_max_requests>50</plack_max_requests>
341
 <plack_workers>2</plack_workers>
341
 <plack_workers>2</plack_workers>
342
342
343
 <!-- SQL report limits, 0 means the feature is disabled -->
344
 <duplicate_running_reports_per_user_limit>0</duplicate_running_reports_per_user_limit>
345
343
 <!-- Configuration for X-Forwarded-For -->
346
 <!-- Configuration for X-Forwarded-For -->
344
 <!--
347
 <!--
345
 <koha_trusted_proxies>1.2.3.4 2.3.4.5 3.4.5.6</koha_trusted_proxies>
348
 <koha_trusted_proxies>1.2.3.4 2.3.4.5 3.4.5.6</koha_trusted_proxies>
(-)a/etc/koha-conf.xml (+3 lines)
Lines 157-162 Link Here
157
 <plack_max_requests>50</plack_max_requests>
157
 <plack_max_requests>50</plack_max_requests>
158
 <plack_workers>2</plack_workers>
158
 <plack_workers>2</plack_workers>
159
159
160
 <!-- SQL report limits, 0 means the feature is disabled -->
161
 <duplicate_running_reports_per_user_limit>0</duplicate_running_reports_per_user_limit>
162
160
 <!-- Configuration for X-Forwarded-For -->
163
 <!-- Configuration for X-Forwarded-For -->
161
 <!--
164
 <!--
162
 <koha_trusted_proxies>1.2.3.4 2.3.4.5 3.4.5.6</koha_trusted_proxies>
165
 <koha_trusted_proxies>1.2.3.4 2.3.4.5 3.4.5.6</koha_trusted_proxies>
(-)a/reports/guided_reports.pl (-3 / +5 lines)
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
- 

Return to bug 41918