diff --git a/VERSION b/VERSION index aa0e5423d..ffaf49cf9 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ PRODUCT_ID=Airtime -PRODUCT_RELEASE=2.0.0-beta1 +PRODUCT_RELEASE=2.0.0 diff --git a/airtime_mvc/application/controllers/ScheduleController.php b/airtime_mvc/application/controllers/ScheduleController.php index 84ab1641a..cb034d758 100644 --- a/airtime_mvc/application/controllers/ScheduleController.php +++ b/airtime_mvc/application/controllers/ScheduleController.php @@ -141,15 +141,19 @@ class ScheduleController extends Zend_Controller_Action $userInfo = Zend_Auth::getInstance()->getStorage()->read(); $user = new Application_Model_User($userInfo->id); - if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) { - try{ + if ($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) { + + try { $showInstance = new Application_Model_ShowInstance($showInstanceId); - }catch(Exception $e){ + } + catch(Exception $e){ $this->view->show_error = true; return false; } $showInstance->delete(); + + $this->view->show_id = $showInstance->getShowId(); } } @@ -801,15 +805,18 @@ class ScheduleController extends Zend_Controller_Action if($user->isUserType(array(UTYPE_ADMIN, UTYPE_PROGRAM_MANAGER))) { $showInstanceId = $this->_getParam('id'); - try{ + try { $showInstance = new Application_Model_ShowInstance($showInstanceId); - }catch(Exception $e){ + } + catch(Exception $e){ $this->view->show_error = true; return false; } $show = new Application_Model_Show($showInstance->getShowId()); $show->cancelShow($showInstance->getShowInstanceStart()); + + $this->view->show_id = $showInstance->getShowId(); } } diff --git a/airtime_mvc/application/models/Preference.php b/airtime_mvc/application/models/Preference.php index cc95e7fe3..71da9b665 100644 --- a/airtime_mvc/application/models/Preference.php +++ b/airtime_mvc/application/models/Preference.php @@ -368,6 +368,7 @@ class Application_Model_Preference $outputArray['STATION_COUNTRY'] = self::GetStationCountry(); $outputArray['STATION_CITY'] = self::GetStationCity(); $outputArray['STATION_DESCRIPTION'] = self::GetStationDescription(); + // get web server info if(isset($systemInfoArray["AIRTIME_VERSION_URL"])){ @@ -387,6 +388,8 @@ class Application_Model_Preference $outputArray['UNIQUE_ID'] = self::GetUniqueId(); $outputArray['SAAS'] = self::GetPlanLevel(); $outputArray['INSTALL_METHOD'] = self::GetInstallMethod(); + $outputArray['NUM_OF_STREAMS'] = self::GetNumOfStreams(); + $outputArray['STREAM_INFO'] = Application_Model_StreamSetting::getStreamInfoForDataCollection(); $outputArray = array_merge($systemInfoArray, $outputArray); @@ -396,7 +399,16 @@ class Application_Model_Preference continue; } if($out != ''){ - $outputString .= $key.' : '.$out."\n"; + if($key == "STREAM_INFO"){ + $outputString .= $key." :\n"; + foreach($out as $s_info){ + foreach($s_info as $k => $v){ + $outputString .= "\t".strtoupper($k)." : ".$v."\n"; + } + } + }else{ + $outputString .= $key.' : '.$out."\n"; + } } } if($returnArray){ diff --git a/airtime_mvc/application/models/StreamSetting.php b/airtime_mvc/application/models/StreamSetting.php index f2731141e..1e4d77956 100644 --- a/airtime_mvc/application/models/StreamSetting.php +++ b/airtime_mvc/application/models/StreamSetting.php @@ -164,4 +164,31 @@ class Application_Model_StreamSetting { } return $result; } + + /* + * Only returns info that is needed for data collection + * returns array('s1'=>array(keyname=>value)) + */ + public static function getStreamInfoForDataCollection(){ + global $CC_DBC; + + $out = array(); + $enabled_stream = self::getEnabledStreamIds(); + + foreach($enabled_stream as $stream){ + $keys = "'".$stream."_output', "."'".$stream."_type', "."'".$stream."_bitrate', "."'".$stream."_host'"; + + $sql = "SELECT keyname, value FROM cc_stream_setting" + ." WHERE keyname IN ($keys)"; + + $rows = $CC_DBC->getAll($sql); + $info = array(); + foreach($rows as $r){ + $temp = explode("_", $r['keyname']); + $info[$temp[1]] = $r['value']; + $out[$stream] = $info; + } + } + return $out; + } } diff --git a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js index 7910f498f..a7640eb5e 100644 --- a/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js +++ b/airtime_mvc/public/js/airtime/schedule/full-calendar-functions.js @@ -8,6 +8,14 @@ function scheduleRefetchEvents(json) { if(json.show_error == true){ alert("The show instance doesn't exist anymore!") } + if(json.show_id) { + var dialog_id = parseInt($("#add_show_id").val(), 10); + + //if you've deleted the show you are currently editing, close the add show dialog. + if (dialog_id === json.show_id) { + $("#add-show-close").click(); + } + } $("#schedule_calendar").fullCalendar( 'refetchEvents' ); } diff --git a/install_minimal/include/airtime-constants.php b/install_minimal/include/airtime-constants.php index bc6f9ccbf..06d7e180c 100644 --- a/install_minimal/include/airtime-constants.php +++ b/install_minimal/include/airtime-constants.php @@ -1,3 +1,3 @@