diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 0006057f7..41ffbeefd 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1792,7 +1792,7 @@ SQL; $show["instance_id"]); $options["show_empty"] = (array_key_exists($show['instance_id'], - $content_count)) ? 1 : 0; + $content_count)) ? 0 : 1; $events[] = &self::makeFullCalendarEvent($show, $options, $startsDT, $endsDT, $startsEpochStr, $endsEpochStr); diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index a73d1f7f0..533118c29 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -679,9 +679,13 @@ SQL; ':p_end' => $p_end->format("Y-m-d G:i:s")) , 'all'); - return $counts; + $real_counts = array(); + foreach ($counts as $c) { + $real_counts[$c['instance_id']] = $c['instance_count']; + } + return $real_counts; - } + } public function showEmpty() { diff --git a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql index 36b4f5734..771c3b13c 100644 --- a/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql +++ b/install_minimal/upgrades/airtime-2.2.0/data/upgrade.sql @@ -140,6 +140,12 @@ ALTER TABLE cc_playlistcontents ALTER TABLE cc_schedule ADD COLUMN stream_id integer; +CREATE INDEX cc_schedule_instance_id_idx + ON cc_schedule + USING btree + (instance_id); + + ALTER TABLE cc_subjs ADD COLUMN cell_phone character varying(255);