Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2012-09-10 15:35:42 -04:00
commit e85ea5c683
12 changed files with 58 additions and 44 deletions

View file

@ -1117,12 +1117,6 @@ SQL;
*/
//$se = $show_end->format('Y-m-d H:i:s');
if ($update) {
$sql = "SELECT id, starts, ends FROM ".$CC_CONFIG["showInstances"]."
where (ends <= '{$show_end->format('Y-m-d H:i:s')}'
or starts <= '{$show_end->format('Y-m-d H:i:s')}')
and date(starts) >= (date('{$show_end->format('Y-m-d H:i:s')}') - INTERVAL '2 days')
and modified_instance = false and id != ".$instanceId. " order by ends";
$stmt = $con->prepare("SELECT id, starts, ends FROM {$CC_CONFIG['showInstances']}
where (ends <= :show_end1
or starts <= :show_end2)
@ -1136,13 +1130,6 @@ SQL;
':instanceId' => $instanceId
));
} else {
// TODO : Remove raw sql later
$sql = "SELECT id, starts, ends FROM ".$CC_CONFIG["showInstances"]."
where (ends <= '{$show_end->format('Y-m-d H:i:s')}'
or starts <= '{$show_end->format('Y-m-d H:i:s')}')
and date(starts) >= (date('{$show_end->format('Y-m-d H:i:s')}') - INTERVAL '2 days')
and modified_instance = false order by ends";
$stmt = $con->prepare("SELECT id, starts, ends FROM
{$CC_CONFIG['showInstances']}
where (ends <= :show_end1 or starts <= :show_end2)
@ -1155,7 +1142,6 @@ SQL;
':show_end3' => $show_end->format('Y-m-d H:i:s')
));
}
//$rows = $con->query($sql);
$rows = $stmt->fetchAll();
foreach ($rows as $row) {