Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 7
- Log:
Initial import of RForum 0.2 sources from a downloaded Tarball.
RForum is a Ruby On Rails based forum and mail gateway service.
- Author:
- adh
- Date:
- Sat Jul 22 18:43:13 +0100 2006
- Size:
- 621 Bytes
1 | require 'search' |
2 | |
3 | class SearchLike < Search |
4 | def initialize |
5 | end |
6 | |
7 | def search(query, forum_ids=[]) |
8 | conditions = 'posts.deleted = 0' |
9 | unless forum_ids.empty? |
10 | conditions << " AND topics.forum_id IN (#{forum_ids.join(',')})" |
11 | end |
12 | |
13 | query = "%#{query}%" |
14 | Post.find_by_sql [" |
15 | SELECT posts.* FROM posts |
16 | LEFT JOIN topics ON posts.topic_id = topics.id |
17 | WHERE #{conditions} |
18 | AND (posts.subject LIKE ? OR posts.text LIKE ?) |
19 | ", query, query] |
20 | end |
21 | |
22 | def update(post) |
23 | end |
24 | |
25 | def delete(post) |
26 | end |
27 | |
28 | def rebuild_index |
29 | end |
30 | |
31 | def supports_search_by_forum?; true; end |
32 | end |