SAAS-673: Warn if public api is not enabled under Preferences
This commit is contained in:
parent
e8c8fde8bd
commit
faee0fba98
|
@ -17,10 +17,15 @@ class EmbeddablePlayerController extends Zend_Controller_Action
|
||||||
|
|
||||||
$form = new Application_Form_EmbeddablePlayer();
|
$form = new Application_Form_EmbeddablePlayer();
|
||||||
|
|
||||||
if ($form->getElement('player_stream_url')->getAttrib('numberOfEnabledStreams') > 0) {
|
$apiEnabled = Application_Model_Preference::GetAllow3rdPartyApi();
|
||||||
|
$numEnabledStreams = $form->getElement('player_stream_url')->getAttrib('numberOfEnabledStreams');
|
||||||
|
|
||||||
|
if ($numEnabledStreams > 0 && $apiEnabled) {
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
} else {
|
} else {
|
||||||
$this->view->errorMsg = "You need to enable at least one MP3, AAC, or OGG stream to use this feature.";
|
$this->view->errorMsg = "To configure and use the embeddable player you must:<br><br>
|
||||||
|
1. Enable at least one MP3, AAC, or OGG stream under System -> Streams<br>
|
||||||
|
2. Enable the Public Airtime API under System -> Preferences";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue