reverse logic of age

This commit is contained in:
r888888888
2013-04-23 13:11:39 -07:00
parent ed66f71fad
commit db69d45632
4 changed files with 10 additions and 1 deletions

View File

@@ -120,7 +120,7 @@ class PostQueryBuilder
relation = add_range_relation(q[:fav_count], "posts.fav_count", relation)
relation = add_range_relation(q[:filesize], "posts.file_size", relation)
relation = add_range_relation(q[:date], "posts.created_at", relation)
relation = add_range_relation(q[:age], "extract(epoch from (CURRENT_TIMESTAMP - posts.created_at))", relation)
relation = add_range_relation(q[:age], "extract(epoch from (posts.created_at - CURRENT_TIMESTAMP))", relation)
relation = add_range_relation(q[:general_tag_count], "posts.tag_count_general", relation)
relation = add_range_relation(q[:artist_tag_count], "posts.tag_count_artist", relation)
relation = add_range_relation(q[:copyright_tag_count], "posts.tag_count_copyright", relation)