Browse files

topic fix

  • Loading branch information...
1 parent aa73885 commit 74b20f016fb43a6aedd74448e641cecebac8d7fb @pudge pudge committed Dec 1, 2004
Showing with 7 additions and 2 deletions.
  1. +7 −2 plugins/Search/search.pl
View
9 plugins/Search/search.pl
@@ -40,7 +40,12 @@ sub main {
my $searchDB = getObject('Slash::Search', { db_type => 'search' });
# Backwards compatibility, we now favor tid over topic
- $form->{tid} ||= $form->{topic};
+ if ($form->{topic}) {
+ if ($form->{topic} =~ s/^([+-]?[\d.]+).*$/$1/s) {
+ $form->{tid} ||= $form->{topic};
+ }
+ delete $form->{topic};
+ }
# Set some defaults
$form->{query} ||= '';
@@ -144,7 +149,7 @@ sub _buildargs {
my($form) = @_;
my $uri;
- for (qw[threshold query author op topic tid section sort journal_only]) {
+ for (qw[threshold query author op tid section sort journal_only]) {
my $x = "";
$x = $form->{$_} if defined $form->{$_} && $x eq "";
$x =~ s/ /+/g;

0 comments on commit 74b20f0

Please sign in to comment.