Skip to content

Commit e1d5a13

Browse files
committed
sorting bags using sorting_time
1 parent 2a1421c commit e1d5a13

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/db.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ def list_empty_bags(&blk)
6565
def list_nonempty_bags_by_page(gap, n, &blk)
6666
$db.fetch("select bag_id, dir from bag where exists
6767
(select * from file natural join image natural join bag_file
68-
where bag_file.bag_id = bag.bag_id) limit ? offset ? ",
68+
where bag_file.bag_id = bag.bag_id) order by sorting_time desc
69+
limit ? offset ? ",
6970
gap, n * gap) { |r| blk.call(r) }
7071
end
7172

0 commit comments

Comments
 (0)