CC-3130: Disabling a Shoutcast stream causes the service type to revert back to Icecast

This happens because we use same field in the db to store whether stream is disabled, and which
type is it (Icecast/Shoutcast). Thus when we disable a stream, we forget about the fact that
it was set to Shoutcast before.

Fixed by separating out the enable/disable state from stream type.
Whether a stream is enabled/disabled is stored in new fields sx_enable.
Stream type is stored in the old fields, sx_output.
This commit is contained in:
Yuchen Wang 2011-11-29 16:25:30 -05:00
parent 85b8209db9
commit 53aecd1c00
7 changed files with 39 additions and 30 deletions

View file

@ -43,7 +43,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
$enable = new Zend_Form_Element_Checkbox('enable');
$enable->setLabel('Enabled:')
->setValue($setting[$prefix.'_output'] != 'disabled'?1:0)
->setValue($setting[$prefix.'_enable'] == 'true' ? 1 : 0)
->setDecorators(array('ViewHelper'));
if($disable_all){
$enable->setAttrib("disabled", "disabled");