2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-31 05:55:11 +00:00

r1803 favtags updates

--HG--
branch : moe
extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%40132
This commit is contained in:
petopeto
2010-09-07 02:54:04 +00:00
parent 88b87d10bf
commit 00badb870d
4 changed files with 25 additions and 14 deletions

View File

@@ -95,9 +95,13 @@ module PostSqlMethods
if q[:favtag].is_a?(String)
user = User.find_by_name(q[:favtag])
q[:favtag] =~ /^(.+?):(.+)$/
username = $1
favtag_name = $2
user = User.find_by_name(username)
if user
post_ids = FavoriteTag.find_post_ids(user.id)
if user && favtag_name
post_ids = FavoriteTag.find_post_ids(user.id, favtag_name)
conds << "p.id IN (?)"
cond_params << post_ids
end