Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/cgi/search.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cgi/search.pl')
-rwxr-xr-xcgi/search.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/cgi/search.pl b/cgi/search.pl
index ce7663e..2c2ca8d 100755
--- a/cgi/search.pl
+++ b/cgi/search.pl
@@ -19,7 +19,7 @@ use utf8;
my $conf = Config::File::read_config_file("cgi.conf");
my $base_url = $conf->{BASE_URL} || "/";
-my $days_per_page = 10;
+my $days_per_page = 7;
my $lines_per_day = 50; # not yet used
my $lines_of_context = 2;
@@ -86,12 +86,12 @@ if (length($nick) or length($qs)){
my @sql_conds = ('channel = ? AND NOT spam');
my @args = ($channel);
if (length $nick){
- push @sql_conds, '(nick = ? OR nick = ?)';
- push @args, $nick, "* $nick";
+ push @sql_conds, '(nick = ? OR nick LIKE ?)';
+ push @args, $nick, "% $nick";
}
if (length $qs) {
- push @sql_conds, 'MATCH(line) AGAINST(?)';
- push @args, $qs;
+ push @sql_conds, 'line LIKE ? AND nick != \'\'';
+ push @args, "%$qs%";
}
my $sql_cond = 'WHERE ' . join(' AND ', @sql_conds);