public function remove() { global $CC_DBC; $music_dir_id = $this->getId(); $sql = "SELECT DISTINCT s.instance_id from cc_music_dirs as md LEFT JOIN cc_files as f on f.directory = md.id\n RIGHT JOIN cc_schedule as s on s.file_id = f.id WHERE md.id = {$music_dir_id}"; $show_instances = $CC_DBC->GetAll($sql); $this->_dir->delete(); foreach ($show_instances as $show_instance_row) { $temp_show = new ShowInstance($show_instance_row["instance_id"]); $temp_show->updateScheduledTime(); } RabbitMq::PushSchedule(); }
/** * Remove the group from the schedule. * Note: does not check if it is in the past, you can remove anything. * * @return boolean * TRUE on success, false if there is no group ID defined. */ public function remove() { global $CC_CONFIG, $CC_DBC; if (is_null($this->groupId) || !is_numeric($this->groupId)) { return false; } $sql = "DELETE FROM " . $CC_CONFIG["scheduleTable"] . " WHERE group_id = " . $this->groupId; //echo $sql; $retVal = $CC_DBC->query($sql); RabbitMq::PushSchedule(); return $retVal; }
public function deleteShow() { // see if it was recording show $recording = CcShowInstancesQuery::create()->findPK($this->_instanceId)->getDbRecord(); CcShowInstancesQuery::create()->findPK($this->_instanceId)->delete(); RabbitMq::PushSchedule(); if ($recording) { RabbitMq::SendMessageToShowRecorder("cancel_recording"); } }
public static function SetStreamLabelFormat($type) { Application_Model_Preference::SetValue("stream_label_format", $type); RabbitMq::PushSchedule(); }