FIX: Properly support defaults for upload site settings.

This commit is contained in:
Guo Xiang Tan
2019-01-02 15:29:17 +08:00
parent 684eef71c7
commit b0c8fdd7da
26 changed files with 170 additions and 151 deletions

View File

@@ -1529,7 +1529,9 @@ class Report
FROM uploads up
JOIN users u
ON u.id = up.user_id
WHERE up.created_at >= '#{report.start_date}' AND up.created_at <= '#{report.end_date}'
WHERE up.created_at >= '#{report.start_date}'
AND up.created_at <= '#{report.end_date}'
AND up.id > #{Upload::SEEDED_ID_THRESHOLD}
ORDER BY up.filesize DESC
LIMIT #{report.limit || 250}
SQL