Fixed miscalculation triggering 'Call for shows'
templates/shared-call_for_shows.tpl.html: - Cosmetic change templates/queries-call_for_shows-mysql.tpl.html: templates/queries-call_for_shows-sqlite.tpl.html: - In a period of 10 days the minimum number of weekday-only shows is 6, not 7. Adjusted the queries appropriately.
This commit is contained in:
parent
d9392bad6c
commit
ccc1982c6c
@ -1,6 +1,6 @@
|
|||||||
<!--% query_call_for_shows = '
|
<!--% query_call_for_shows = '
|
||||||
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
|
SELECT CASE WHEN COUNT(id) < 6 THEN True ELSE False END AS `request_for_shows`
|
||||||
FROM eps
|
FROM eps
|
||||||
WHERE eps.date > NOW() AND eps.date < DATE_ADD(NOW(), INTERVAL 10 DAY)
|
WHERE eps.date > NOW() AND eps.date <= DATE_ADD(NOW(), INTERVAL 10 DAY)
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!--% query_call_for_shows = '
|
<!--% query_call_for_shows = '
|
||||||
SELECT CASE WHEN COUNT(id) < 7 THEN True ELSE False END AS `request_for_shows`
|
SELECT CASE WHEN COUNT(id) < 6 THEN True ELSE False END AS `request_for_shows`
|
||||||
FROM eps
|
FROM eps
|
||||||
WHERE eps.date > date(\'now\') AND eps.date < date(\'now\', \'+10 days\')
|
WHERE eps.date > date(\'now\') AND eps.date <= date(\'now\', \'+10 days\')
|
||||||
'
|
'
|
||||||
%-->
|
%-->
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
<!--% PROCESS 'shared-utils.tpl.html' %-->
|
||||||
<!--% PROCESS "queries-call_for_shows-${constants.database}.tpl.html" %-->
|
<!--% PROCESS "queries-call_for_shows-${constants.database}.tpl.html" %-->
|
||||||
<!--% MACRO display_call_for_shows BLOCK %-->
|
<!--% MACRO display_call_for_shows BLOCK %-->
|
||||||
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows)
|
<!--% result_call_for_shows = DBI.prepare(query_call_for_shows) %-->
|
||||||
%-->
|
|
||||||
<!--% results_call_for_shows = result_call_for_shows.execute().get_all() %-->
|
<!--% results_call_for_shows = result_call_for_shows.execute().get_all() %-->
|
||||||
<!--% IF results_call_for_shows.0.request_for_shows == 1 %-->
|
<!--% IF results_call_for_shows.0.request_for_shows == 1 %-->
|
||||||
<!--% USE date %-->
|
<!--% USE date %-->
|
||||||
|
Reference in New Issue
Block a user