Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
18dd0f232a
|
@ -1223,8 +1223,10 @@ class Application_Model_Show
|
||||||
$p_populateUntilDateTime = $date;
|
$p_populateUntilDateTime = $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT * FROM cc_show_days WHERE show_id = $p_showId";
|
$stmt = $con->prepare("SELECT * FROM cc_show_days WHERE show_id = :show_id");
|
||||||
$res = $con->query($sql)->fetchAll();
|
$stmt->bindParam(':show_id', $p_showId);
|
||||||
|
|
||||||
|
$res = $stmt->execute()->fetchAll();
|
||||||
|
|
||||||
foreach ($res as $showDaysRow) {
|
foreach ($res as $showDaysRow) {
|
||||||
Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime);
|
Application_Model_Show::populateShow($showDaysRow, $p_populateUntilDateTime);
|
||||||
|
@ -1620,12 +1622,20 @@ class Application_Model_Show
|
||||||
$startTimeString = $today_timestamp->format("Y-m-d H:i:s");
|
$startTimeString = $today_timestamp->format("Y-m-d H:i:s");
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "SELECT * FROM cc_show_days
|
$stmt = $con->prepare("
|
||||||
WHERE last_show IS NULL
|
SELECT * FROM cc_show_days
|
||||||
OR first_show < '{$endTimeString}' AND last_show > '{$startTimeString}'";
|
WHERE last_show IS NULL
|
||||||
|
OR first_show < :endTimeString AND last_show > :startTimeString");
|
||||||
|
|
||||||
//Logging::info($sql);
|
//$stmt->execute(array(
|
||||||
$res = $con->query($sql)->fetchAll();
|
//':endTimeString' => $endTimeString,
|
||||||
|
//':startTimeString' => $startTimeString
|
||||||
|
//));
|
||||||
|
$stmt->bindParam(':endTimeString', $endTimeString);
|
||||||
|
$stmt->bindParam(':startTimeString', $startTimeString);
|
||||||
|
|
||||||
|
|
||||||
|
$res = $stmt->execute()->fetchAll();
|
||||||
foreach ($res as $row) {
|
foreach ($res as $row) {
|
||||||
Application_Model_Show::populateShow($row, $p_endTimestamp);
|
Application_Model_Show::populateShow($row, $p_endTimestamp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue