Fix index by moving the if statement
This commit is contained in:
parent
332fec8119
commit
6616572f05
|
@ -84,6 +84,8 @@ function main() {
|
|||
for ($i = 1; $i < $packageCount+1; $i++) {
|
||||
if (preg_match("/$query/i", $packageNames[$i]) == 0) {
|
||||
continue;
|
||||
} else if ($matches[$i+1] == $matches[$i]) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$matches[$validPkgs] = $packageNames[$i];
|
||||
|
@ -103,9 +105,6 @@ function main() {
|
|||
print "\t\t\t\t</tr>\n";
|
||||
|
||||
for ($i = 0; $i < $validPkgs; $i++) {
|
||||
if ($matches[$i+1] == $matches[$i]) {
|
||||
continue;
|
||||
}
|
||||
print "\t\t\t\t\t<tr>\n";
|
||||
print "\t\t\t\t\t\t<td><a href=\"$self?action=view&q=$matches[$i]\">$matches[$i]</a></td>\n";
|
||||
print "\t\t\t\t\t\t<td>$matchingDescs[$i]</td>\n";
|
||||
|
|
Loading…
Reference in a new issue