Merge branch 'saas-dev' into saas-installer-albert

This commit is contained in:
Albert Santoni 2015-06-10 12:02:08 -04:00
commit 3996e757b7
10 changed files with 93 additions and 36 deletions

View file

@ -1157,13 +1157,13 @@ WHERE si.show_id = s.id
AND si.starts >= :timeNow::timestamp - INTERVAL '2 days'
AND si.starts < :timeEnd::timestamp
AND modified_instance != TRUE
ORDER BY
CASE
ORDER BY
CASE
WHEN si.ends > :timeNow::timestamp
AND si.starts < :timeNow::timestamp THEN 1
WHEN si.starts > :timeNow::timestamp THEN 2
ELSE 3
END
END, si.starts
LIMIT :lim
SQL;