Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
421f543f99
|
@ -193,7 +193,7 @@ class PreferenceController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->view->num_stream = $num_of_stream;
|
$this->view->num_stream = $num_of_stream;
|
||||||
$this->view->disable_stream_conf = Application_Model_Preference::GetDisableStreamConf();
|
$this->view->enable_stream_conf = Application_Model_Preference::GetEnableStreamConf();
|
||||||
$this->view->form = $form;
|
$this->view->form = $form;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,14 +13,14 @@ class Application_Form_StreamSetting extends Zend_Form
|
||||||
$this->setting = $setting;
|
$this->setting = $setting;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function startFrom(){
|
public function startFrom() {
|
||||||
$setting = $this->setting;
|
$setting = $this->setting;
|
||||||
$output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
|
$output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
|
||||||
$output_sound_device->setLabel('Enabled')
|
$output_sound_device->setLabel('Enabled')
|
||||||
->setRequired(false)
|
->setRequired(false)
|
||||||
->setValue(($setting['output_sound_device'] == "true")?1:0)
|
->setValue(($setting['output_sound_device'] == "true")?1:0)
|
||||||
->setDecorators(array('ViewHelper'));
|
->setDecorators(array('ViewHelper'));
|
||||||
if(Application_Model_Preference::GetDisableStreamConf() == "true"){
|
if (Application_Model_Preference::GetEnableStreamConf() == "false"){
|
||||||
$output_sound_device->setAttrib("readonly", true);
|
$output_sound_device->setAttrib("readonly", true);
|
||||||
}
|
}
|
||||||
$this->addElement($output_sound_device);
|
$this->addElement($output_sound_device);
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
|
||||||
$this->setElementsBelongTo($prefix."_data");
|
$this->setElementsBelongTo($prefix."_data");
|
||||||
|
|
||||||
$disable_all = false;
|
$disable_all = false;
|
||||||
if(Application_Model_Preference::GetDisableStreamConf() == "true"){
|
if(Application_Model_Preference::GetEnableStreamConf() == "false"){
|
||||||
$disable_all = true;
|
$disable_all = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -427,12 +427,12 @@ class Application_Model_Preference
|
||||||
return self::GetValue("trial_end_date");
|
return self::GetValue("trial_end_date");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function SetDisableStreamConf($bool){
|
public static function SetEnableStreamConf($bool){
|
||||||
self::SetValue("disable_stream_conf", $bool);
|
self::SetValue("enable_stream_conf", $bool);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetDisableStreamConf(){
|
public static function GetEnableStreamConf(){
|
||||||
return self::GetValue("disable_stream_conf");
|
return self::GetValue("enable_stream_conf");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function GetAirtimeVersion(){
|
public static function GetAirtimeVersion(){
|
||||||
|
|
|
@ -958,7 +958,7 @@ class Application_Model_StoredFile {
|
||||||
$this->setSoundCloudErrorCode($code);
|
$this->setSoundCloudErrorCode($code);
|
||||||
$this->setSoundCloudErrorMsg($msg);
|
$this->setSoundCloudErrorMsg($msg);
|
||||||
// setting sc id to -3 which indicates error
|
// setting sc id to -3 which indicates error
|
||||||
$this->setSoundCloudFileId(-3);
|
$this->setSoundCloudFileId(SOUNDCLOUD_ERROR);
|
||||||
if(!in_array($code, array(0, 100))) {
|
if(!in_array($code, array(0, 100))) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong stream-config">
|
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong stream-config">
|
||||||
<h2 style="float:left">Stream Settings</h2>
|
<h2 style="float:left">Stream Settings</h2>
|
||||||
<?php if($this->disable_stream_conf != "true"){?>
|
<?php if($this->enable_stream_conf == "true"){?>
|
||||||
<form method="post" action="/Preference/stream-setting" enctype="application/x-www-form-urlencoded">
|
<form method="post" action="/Preference/stream-setting" enctype="application/x-www-form-urlencoded">
|
||||||
<div class="button-bar bottom" id="submit-element" style="float:right">
|
<div class="button-bar bottom" id="submit-element" style="float:right">
|
||||||
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
echo $this->form->getSubform("s".$i."_subform");
|
echo $this->form->getSubform("s".$i."_subform");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<?php if($this->disable_stream_conf != "true"){?>
|
<?php if($this->enable_stream_conf == "true"){?>
|
||||||
<div class="button-bar bottom" id="submit-element">
|
<div class="button-bar bottom" id="submit-element">
|
||||||
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue