diff options
| author | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-07-26 21:54:17 -0400 |
|---|---|---|
| committer | dumpfmprod <dumpfmprod@ubuntu.(none)> | 2010-07-26 21:54:17 -0400 |
| commit | 4cfea99f87486704e5f17d075d488bc733ffa19e (patch) | |
| tree | 6104aa6632548e7e51e4348da4a509f928cbea84 | |
| parent | b1a14320f0d427992352d8205da1ca9cc7777c1c (diff) | |
only search main room to prevent porn spam
| -rw-r--r-- | src/site.clj | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/site.clj b/src/site.clj index e38171e..1a9cc05 100644 --- a/src/site.clj +++ b/src/site.clj @@ -947,11 +947,10 @@ order by count desc limit ? offset ?") (defn ghetto-search-query [num-tokens] (str "select - content from messages, rooms - where messages.room_id=rooms.room_id + content from messages + where room_id = 1 and content ilike " (str-join " and content ilike " (take num-tokens (repeat "?"))) " and content like '%http://%' - and admin_only = 'f' order by message_id desc limit 250;")) |
