Skip to content

Commit

Permalink
Use more suitable query name
Browse files Browse the repository at this point in the history
portdata_selectall actually only selects portdata for specific
maintainer, so rename it to portdata_selectmaintainer so
portdata_selectall could be reused.
  • Loading branch information
AMDmi3 committed Nov 14, 2018
1 parent 2d688b7 commit 8205fa1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Portscout/SQL.pm
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ $sql{portdata_uncheck} =

#$sql{portdata_genresults}

$sql{portdata_selectall} =
$sql{portdata_selectmaintainer} =
q(SELECT *
FROM portdata
WHERE lower(maintainer) = lower(?)
Expand Down
6 changes: 3 additions & 3 deletions portscout.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ sub GenerateHTML
$dbh = connect_db();

prepare_sql($dbh, \%sths,
qw(portdata_genresults portdata_selectall portdata_selectall_limited)
qw(portdata_genresults portdata_selectmaintainer portdata_selectall_limited)
);

if ($Portscout::SQL::sql{portdata_genresults_init}) {
Expand Down Expand Up @@ -1323,8 +1323,8 @@ sub GenerateHTML
$outdata{maintainer} = $addr;
$template->applyglobal(\%outdata);

$sths{portdata_selectall}->execute($addr);
while (my $row = $sths{portdata_selectall}->fetchrow_hashref) {
$sths{portdata_selectmaintainer}->execute($addr);
while (my $row = $sths{portdata_selectmaintainer}->fetchrow_hashref) {
if ($row->{ignore}) {
$row->{method} = 'X';
$row->{newver} = '';
Expand Down

0 comments on commit 8205fa1

Please sign in to comment.