style(legacy): format Schedule.php
This commit is contained in:
parent
dd371702b0
commit
216ab62507
|
@ -21,7 +21,8 @@ WHERE file_id = :file_id
|
|||
AND ends > NOW() AT TIME ZONE 'UTC'
|
||||
SQL;
|
||||
$count = Application_Common_Database::prepareAndExecute($sql, [
|
||||
':file_id' => $p_fileId, ], 'column');
|
||||
':file_id' => $p_fileId,
|
||||
], 'column');
|
||||
|
||||
return is_numeric($count) && ($count != '0');
|
||||
}
|
||||
|
@ -630,7 +631,8 @@ SQL;
|
|||
return Application_Common_Database::prepareAndExecute($sql, [
|
||||
':broadcastedValue' => $value,
|
||||
':starts' => $now,
|
||||
':ends' => $now, ], 'execute');
|
||||
':ends' => $now,
|
||||
], 'execute');
|
||||
}
|
||||
|
||||
public static function getSchduledPlaylistCount()
|
||||
|
@ -777,7 +779,8 @@ SQL;
|
|||
$rows = Application_Common_Database::prepareAndExecute($sql, [
|
||||
':startTime1' => $p_startTime,
|
||||
':endTime' => $p_endTime,
|
||||
':startTime2' => $p_startTime, ]);
|
||||
':startTime2' => $p_startTime,
|
||||
]);
|
||||
|
||||
if (count($rows) < 3) {
|
||||
$dt = new DateTime('@' . time());
|
||||
|
@ -799,7 +802,8 @@ SQL;
|
|||
[
|
||||
':startTime1' => $p_startTime,
|
||||
':rangeEnd' => $range_end,
|
||||
':startTime2' => $p_startTime, ]
|
||||
':startTime2' => $p_startTime,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1100,10 +1104,12 @@ SQL;
|
|||
$previous_previous_previous_key = null;
|
||||
$previous_previous_previous_val = null;
|
||||
foreach ($data as $k => $v) {
|
||||
if ($v['type'] == 'stream_output_start'
|
||||
if (
|
||||
$v['type'] == 'stream_output_start'
|
||||
&& !is_null($previous_previous_val)
|
||||
&& $previous_previous_val['type'] == 'stream_output_end'
|
||||
&& self::areEventsLinked($previous_previous_val, $v)) {
|
||||
&& self::areEventsLinked($previous_previous_val, $v)
|
||||
) {
|
||||
unset($data[$previous_previous_previous_key], $data[$previous_previous_key], $data[$previous_key]);
|
||||
|
||||
if ($previous_previous_val['uri'] == $v['uri']) {
|
||||
|
@ -1235,15 +1241,18 @@ SQL;
|
|||
$rows = Application_Common_Database::prepareAndExecute($sql, [
|
||||
':show_end1' => $show_end->format(DEFAULT_TIMESTAMP_FORMAT),
|
||||
':show_end2' => $show_end->format(DEFAULT_TIMESTAMP_FORMAT),
|
||||
':show_end3' => $show_end->format(DEFAULT_TIMESTAMP_FORMAT), ], 'all');
|
||||
':show_end3' => $show_end->format(DEFAULT_TIMESTAMP_FORMAT),
|
||||
], 'all');
|
||||
}
|
||||
|
||||
foreach ($rows as $row) {
|
||||
$start = new DateTime($row['starts'], new DateTimeZone('UTC'));
|
||||
$end = new DateTime($row['ends'], new DateTimeZone('UTC'));
|
||||
|
||||
if ($show_start->getTimestamp() < $end->getTimestamp()
|
||||
&& $show_end->getTimestamp() > $start->getTimestamp()) {
|
||||
if (
|
||||
$show_start->getTimestamp() < $end->getTimestamp()
|
||||
&& $show_end->getTimestamp() > $start->getTimestamp()
|
||||
) {
|
||||
$overlapping = true;
|
||||
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue