From 1d91d1b11b8d4eeab6cc123c9d3d5078aba0ed69 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 16 Apr 2012 18:21:28 -0400 Subject: [PATCH] CC-3659: Override on Master/Show Source connection needs to have better description about what the override field actually does. - fixed description - extra fix: - using variable instead of hard coded text - removed unnecessary code --- .../controllers/PreferenceController.php | 2 +- .../forms/LiveStreamingPreferences.php | 23 ++++--------------- .../scripts/form/preferences_livestream.phtml | 17 +++++++++----- 3 files changed, 16 insertions(+), 26 deletions(-) diff --git a/airtime_mvc/application/controllers/PreferenceController.php b/airtime_mvc/application/controllers/PreferenceController.php index 8a5f9e9db..00ecbfea3 100644 --- a/airtime_mvc/application/controllers/PreferenceController.php +++ b/airtime_mvc/application/controllers/PreferenceController.php @@ -238,9 +238,9 @@ class PreferenceController extends Zend_Controller_Action Application_Model_RabbitMq::SendMessageToPypo("update_stream_setting", $data); $this->view->statusMsg = "
Stream Setting Updated.
"; } - $live_stream_subform->updateConnectionURLs(); } + $live_stream_subform->updateVariables(); $this->view->confirm_pypo_restart_text = "If you change the username or password values for an enabled stream the playout engine will be rebooted and your listeners will hear silence for 5-10 seconds. Changing the following fields will NOT cause a reboot: Stream Label (Global Settings), and Switch Transition Fade(s), Master Username, and Master Password (Input Stream Settings)."; $this->view->num_stream = $num_of_stream; diff --git a/airtime_mvc/application/forms/LiveStreamingPreferences.php b/airtime_mvc/application/forms/LiveStreamingPreferences.php index d97530c2a..7d22f6383 100644 --- a/airtime_mvc/application/forms/LiveStreamingPreferences.php +++ b/airtime_mvc/application/forms/LiveStreamingPreferences.php @@ -78,26 +78,9 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm array('regex', false, array('/^[^ &<>]+$/', 'messages' => 'Invalid character entered')))) ->setDecorators(array('ViewHelper')); $this->addElement($live_dj_mount); - - $master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL(); - $live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL(); - - $master_dj_connection_url = ($master_dj_connection_url == "")?("http://".$_SERVER['SERVER_NAME'].":".$m_port."/".$m_mount):$master_dj_connection_url; - $live_dj_connection_url = ($live_dj_connection_url == "")?"http://".$_SERVER['SERVER_NAME'].":".$l_port."/".$l_mount:$live_dj_connection_url; - - if($m_port=="" || $m_mount==""){ - $master_dj_connection_url = "N/A"; - } - if($l_port=="" || $l_mount==""){ - $live_dj_connection_url = "N/A"; - } - - $this->setDecorators(array( - array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url,)) - )); } - public function updateConnectionURLs(){ + public function updateVariables(){ $m_port = Application_Model_StreamSetting::GetMasterLiveSteamPort(); $m_mount = Application_Model_StreamSetting::GetMasterLiveSteamMountPoint(); $l_port = Application_Model_StreamSetting::GetDJLiveSteamPort(); @@ -116,8 +99,10 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm $live_dj_connection_url = "N/A"; } + $overrideDescription = "If Airtime is behind a router or firewall, you may need to configure port forwarding and this field information will be incorrect. In this case you will need to manually update this field so it shows the correct host/port/mount that your DJ's need to connect to. For more detail, please read the Airtime manual."; + $this->setDecorators(array( - array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url,)) + array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url,'overrideDescription' => $overrideDescription)) )); } diff --git a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml index 37459635b..9e48cb6ff 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml @@ -77,11 +77,11 @@
master_dj_connection_url ?> override   - - - This is the URL used by remote sources to connect to Airtime. If Airtime is behind a router or firewall, you may need to configure port forwarding. For details, please read the Airtime manual. - -
+ + + overrideDescription ?> + +
@@ -117,7 +117,12 @@
- live_dj_connection_url ?> override + live_dj_connection_url ?> override   + + + overrideDescription?> + +