Merge pull request #402 from Robbt/fix/display-autoplaylist-on-calendar
fixed autoplaylist database logic and icon position
This commit is contained in:
commit
4469d0c252
|
@ -1024,8 +1024,6 @@ SQL;
|
|||
$p_start, $p_end);
|
||||
$isFull = Application_Model_ShowInstance::getIsFull($p_start, $p_end);
|
||||
$hasAutoPlaylist = Application_Model_ShowInstance::getShowHasAutoplaylist($p_start, $p_end);
|
||||
|
||||
|
||||
$displayTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
|
||||
$utcTimezone = new DateTimeZone("UTC");
|
||||
$now = new DateTime("now", $utcTimezone);
|
||||
|
@ -1067,9 +1065,9 @@ SQL;
|
|||
$options["show_partial_filled"] = true;
|
||||
}
|
||||
if (array_key_exists($show['instance_id'], $hasAutoPlaylist)) {
|
||||
$options["show_has_auto_playlist"] = !$hasAutoPlaylist[$show['instance_id']];
|
||||
} else {
|
||||
$options["show_has_auto_playlist"] = true;
|
||||
} else {
|
||||
$options["show_has_auto_playlist"] = false;
|
||||
}
|
||||
|
||||
$event = array();
|
||||
|
|
|
@ -565,9 +565,15 @@ SQL;
|
|||
->filterByDbEnds($p_end->format(DEFAULT_TIMESTAMP_FORMAT), Criteria::LESS_THAN)
|
||||
->filterByDbStarts($p_start->format(DEFAULT_TIMESTAMP_FORMAT), Criteria::GREATER_THAN)
|
||||
->leftJoinCcShow()
|
||||
->where('CcShow.has_autoplaylist = ?', 'true')
|
||||
->find($con);
|
||||
return $showInstances;
|
||||
$hasAutoplaylist = array();
|
||||
foreach ($showInstances->toArray() as $ap) {
|
||||
$hasAutoplaylist[$ap['DbId']] = true;
|
||||
}
|
||||
return $hasAutoplaylist;
|
||||
}
|
||||
|
||||
catch (Exception $e) {
|
||||
$con->rollback();
|
||||
Logging::info("Couldn't query show instances for calendar to find which had autoplaylists");
|
||||
|
|
|
@ -2277,7 +2277,6 @@ span.errors.sp-errors{
|
|||
}
|
||||
.small-icon.autoplaylist {
|
||||
background:url(images/icon_alert_cal_autoplaylist.png) no-repeat 0 0;
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.small-icon.recording {
|
||||
|
|
Loading…
Reference in New Issue