Mailing List Archive

DISTINCT missing in SpecialWantedpages.php
Number of links to article is counted, instead of number of other articles
that link to it. Difference is important, because on some pages there is
enormous number of links to the same article. For example on
alphabetical lists of cities in Poland, there are so many links to
voivodships pages that they immediately become "most wanted".
Most wanted article with these settings has value 609, without 69.

Query:
$sql = "SELECT bl_to, COUNT( bl_to ) as nlinks " .
"FROM brokenlinks GROUP BY bl_to HAVING nlinks > 1 " .
"ORDER BY nlinks DESC LIMIT {$offset}, {$limit}";

Should be changed to something like that:
$sql = "SELECT bl_to, COUNT( DISTINCT bl_from ) as nlinks " .
"FROM brokenlinks GROUP BY bl_to HAVING nlinks > 1 " .
"ORDER BY nlinks DESC LIMIT {$offset}, {$limit}";