CC-4090: Make code style PSR compliant
-run psr-cs-fixer
This commit is contained in:
parent
5661872034
commit
794cf2c845
40 changed files with 2017 additions and 1874 deletions
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
class Application_Model_StreamSetting {
|
||||
|
||||
class Application_Model_StreamSetting
|
||||
{
|
||||
public static function setValue($key, $value, $type)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
@ -30,7 +30,7 @@ class Application_Model_StreamSetting {
|
|||
public static function getValue($key)
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
//Check if key already exists
|
||||
$sql = "SELECT COUNT(*) FROM cc_stream_setting"
|
||||
|
@ -44,6 +44,7 @@ class Application_Model_StreamSetting {
|
|||
." WHERE keyname = '$key'";
|
||||
|
||||
$result = $con->query($sql)->fetchColumn(0);
|
||||
|
||||
return ($result !== false) ? $result : null;
|
||||
}
|
||||
}
|
||||
|
@ -120,11 +121,11 @@ class Application_Model_StreamSetting {
|
|||
foreach ($rows as $r) {
|
||||
if ($r['keyname'] == 'master_live_stream_port') {
|
||||
$exists['master_live_stream_port'] = true;
|
||||
} elseif($r['keyname'] == 'master_live_stream_mp') {
|
||||
} elseif ($r['keyname'] == 'master_live_stream_mp') {
|
||||
$exists['master_live_stream_mp'] = true;
|
||||
} elseif($r['keyname'] == 'dj_live_stream_port') {
|
||||
} elseif ($r['keyname'] == 'dj_live_stream_port') {
|
||||
$exists['dj_live_stream_port'] = true;
|
||||
} elseif($r['keyname'] == 'dj_live_stream_mp') {
|
||||
} elseif ($r['keyname'] == 'dj_live_stream_mp') {
|
||||
$exists['dj_live_stream_mp'] = true;
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +150,7 @@ class Application_Model_StreamSetting {
|
|||
"value"=>self::getDjLiveStreamMountPoint(),
|
||||
"type"=>"string");
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
|
@ -168,10 +170,10 @@ class Application_Model_StreamSetting {
|
|||
$v = $d == 1?"true":"false";
|
||||
$sql = "UPDATE cc_stream_setting SET value='$v' WHERE keyname='$key'";
|
||||
$con->exec($sql);
|
||||
} else if ($key == "output_sound_device_type") {
|
||||
} elseif ($key == "output_sound_device_type") {
|
||||
$sql = "UPDATE cc_stream_setting SET value='$d' WHERE keyname='$key'";
|
||||
$con->exec($sql);
|
||||
} else if (is_array($d)) {
|
||||
} elseif (is_array($d)) {
|
||||
$temp = explode('_', $key);
|
||||
$prefix = $temp[0];
|
||||
foreach ($d as $k => $v) {
|
||||
|
@ -198,7 +200,7 @@ class Application_Model_StreamSetting {
|
|||
*/
|
||||
public static function setIndivisualStreamSetting($data)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
foreach ($data as $keyname => $v) {
|
||||
$sql = "UPDATE cc_stream_setting SET value='$v' WHERE keyname='$keyname'";
|
||||
|
@ -212,7 +214,7 @@ class Application_Model_StreamSetting {
|
|||
*/
|
||||
public static function setLiquidsoapError($stream_id, $msg, $boot_time=null)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$update_time = Application_Model_Preference::GetStreamUpdateTimestemp();
|
||||
if ($boot_time == null || $boot_time > $update_time) {
|
||||
|
@ -234,7 +236,7 @@ class Application_Model_StreamSetting {
|
|||
|
||||
public static function getLiquidsoapError($stream_id)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$keyname = "s".$stream_id."_liquidsoap_error";
|
||||
$sql = "SELECT value FROM cc_stream_setting"
|
||||
|
@ -246,7 +248,7 @@ class Application_Model_StreamSetting {
|
|||
|
||||
public static function getStreamEnabled($stream_id)
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$keyname = "s" . $stream_id . "_enable";
|
||||
$sql = "SELECT value FROM cc_stream_setting"
|
||||
|
@ -257,6 +259,7 @@ class Application_Model_StreamSetting {
|
|||
} else {
|
||||
$result = true;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
@ -266,7 +269,7 @@ class Application_Model_StreamSetting {
|
|||
*/
|
||||
public static function getStreamInfoForDataCollection()
|
||||
{
|
||||
$con = Propel::getConnection();
|
||||
$con = Propel::getConnection();
|
||||
|
||||
$out = array();
|
||||
$enabled_stream = self::getEnabledStreamIds();
|
||||
|
@ -286,6 +289,7 @@ class Application_Model_StreamSetting {
|
|||
$out[$stream] = $info;
|
||||
}
|
||||
}
|
||||
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue