OSDN Git Service
(root)
/
mubot4fb
/
mubot4fb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dc04891
)
update search
author
ISHIKAWA Mutsumi
<ishikawa@hanzubon.jp>
Thu, 18 Oct 2012 06:05:37 +0000
(15:05 +0900)
committer
ISHIKAWA Mutsumi
<ishikawa@hanzubon.jp>
Thu, 18 Oct 2012 06:05:37 +0000
(15:05 +0900)
mubot4fb.pl
patch
|
blob
|
history
diff --git
a/mubot4fb.pl
b/mubot4fb.pl
index
1c20ee2
..
ad891a0
100755
(executable)
--- a/
mubot4fb.pl
+++ b/
mubot4fb.pl
@@
-126,7
+126,9
@@
sub _db_delete {
sub _db_search {
my ($me, $word) = @_;
- my $sth = $me->{dbh}->prepare('select * from posts where match(prefix,uri,suffix) against(?) order by post_time desc limit 1000');
+ $column ? $word =~ !://! ? 'uri' : 'path';
+
+ my $sth = $me->{dbh}->prepare('select * from posts where match(prefix,'.$column.',suffix) against(?) order by post_time desc limit 1000');
$sth->bind_param(1, $word, SQL_VARCHAR);
$sth->execute();