CC-2745: Show status of liquidsoap/icecast connection on Stream Settings page
- fixed a case where it was displaying "OK" when liquidsoap was not running
This commit is contained in:
parent
fb8735588d
commit
f2bf92297a
|
@ -732,7 +732,7 @@ class ApiController extends Zend_Controller_Action
|
|||
|
||||
$stream_id = $request->getParam('stream_id');
|
||||
// setting error_msg as "" when there is no error_msg
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, "");
|
||||
Application_Model_StreamSetting::setLiquidsoapError($stream_id, "OK");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -292,7 +292,7 @@ class PreferenceController extends Zend_Controller_Action
|
|||
$num_of_stream = intval(Application_Model_Preference::GetNumOfStreams());
|
||||
for($i=1; $i<=$num_of_stream; $i++){
|
||||
$status = Application_Model_StreamSetting::getLiquidsoapError($i);
|
||||
$status = $status == ''?"OK":$status;
|
||||
$status = $status == NULL?"Problem with Liquidsoap...":$status;
|
||||
if(!Application_Model_StreamSetting::getStreamEnabled($i)){
|
||||
$status = "N/A";
|
||||
}
|
||||
|
|
|
@ -108,10 +108,11 @@ class Application_Model_StreamSetting {
|
|||
public static function getStreamEnabled($stream_id){
|
||||
global $CC_DBC;
|
||||
|
||||
$keyname = "s".$stream_id."_ouput";
|
||||
$keyname = "s".$stream_id."_output";
|
||||
$sql = "SELECT value FROM cc_stream_setting"
|
||||
." WHERE keyname = '$keyname'";
|
||||
$result = $CC_DBC->GetOne($sql);
|
||||
|
||||
if($result == 'disabled'){
|
||||
$result = false;
|
||||
}else{
|
||||
|
|
Loading…
Reference in New Issue