diff --git a/webmin_search.cgi b/webmin_search.cgi
index 7bc3d79ce..43978e333 100755
--- a/webmin_search.cgi
+++ b/webmin_search.cgi
@@ -67,6 +67,13 @@ if (@rv) {
else {
$cargs = "?".$cargs if ($cargs ne '' &&
$cargs !~ /^(\/|%2F)/);
+ # Don't print it two times, it's very confusing
+ if (grep(/^$ctitle$/, @links)) {
+ my $i = 0;
+ my $c = scalar @links;
+ $i++ until $links[$i] eq $ctitle or $i == $c;
+ splice(@links, $i, 1);
+ }
push(@links,
"$ctitle");
}
@@ -78,7 +85,7 @@ if (@rv) {
$hi,
$text{'wsearch_type_'.$r->{'type'}},
"{'dir'}/'>$r->{'mod'}->{'desc'}",
- &ui_links_row(\@links),
+ &ui_links_row(\@links, 1),
]);
}
print &ui_columns_end();