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

(-)a/C4/Serials.pm (-2 / +2 lines)
Lines 628-635 sub SearchSubscriptions { Link Here
628
628
629
    my $total_results = @{$results};
629
    my $total_results = @{$results};
630
630
631
    if ($params->{results_limit} && $total_results > $params->{results_limit}) {
631
    if ( $params->{results_limit} && $total_results > $params->{results_limit} ) {
632
        $results = [splice(@{$results}, 0, $params->{results_limit})];
632
        $results = [ splice( @{$results}, 0, $params->{results_limit} ) ];
633
    }
633
    }
634
634
635
    for my $subscription ( @$results ) {
635
    for my $subscription ( @$results ) {
(-)a/installer/data/mysql/atomicupdate/bug-31846-serials-search-results-limit.pl (-6 / +9 lines)
Lines 1-16 Link Here
1
use Modern::Perl;
1
use Modern::Perl;
2
2
3
return {
3
return {
4
    bug_number => "31846",
4
    bug_number  => "31846",
5
    description => "Add SerialsSearchResultsLimit syspref",
5
    description => "Add SerialsSearchResultsLimit syspref",
6
    up => sub {
6
    up          => sub {
7
        my ($args) = @_;
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
9
        # Do you stuffs here
10
        # Do you stuffs here
10
        $dbh->do(q{
11
        $dbh->do(
12
            q{
11
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
13
            INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
12
            VALUES ('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer')
14
            VALUES ('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer')
13
        });
15
        }
16
        );
17
14
        # Print useful stuff here
18
        # Print useful stuff here
15
        say $out "SerialsSearchResultsLimit syspref added";
19
        say $out "SerialsSearchResultsLimit syspref added";
16
    },
20
    },
17
- 

Return to bug 31846