Bug 31846: (QA follow-up) Tidy code to make qa script happy

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle M Hall 2023-10-13 09:56:00 -04:00 committed by Tomas Cohen Arazi
parent eae494fb33
commit 43d9ee68fc
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
2 changed files with 11 additions and 7 deletions

View File

@ -628,8 +628,8 @@ sub SearchSubscriptions {
my $total_results = @{$results};
if ($params->{results_limit} && $total_results > $params->{results_limit}) {
$results = [splice(@{$results}, 0, $params->{results_limit})];
if ( $params->{results_limit} && $total_results > $params->{results_limit} ) {
$results = [ splice( @{$results}, 0, $params->{results_limit} ) ];
}
for my $subscription ( @$results ) {

View File

@ -1,16 +1,20 @@
use Modern::Perl;
return {
bug_number => "31846",
bug_number => "31846",
description => "Add SerialsSearchResultsLimit syspref",
up => sub {
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(q{
$dbh->do(
q{
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type)
VALUES ('SerialsSearchResultsLimit', NULL, NULL, 'Serials search results limit', 'integer')
});
}
);
# Print useful stuff here
say $out "SerialsSearchResultsLimit syspref added";
},