Format code using php-cs-fixer
This commit is contained in:
parent
43d7dc92cd
commit
d52c6184b9
352 changed files with 17473 additions and 17041 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$CC_CONFIG = Config::getConfig();
|
||||
|
@ -10,29 +9,32 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
|
||||
$defaultFade = Application_Model_Preference::GetDefaultTransitionFade();
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml')),
|
||||
));
|
||||
$this->setDecorators([
|
||||
['ViewScript', ['viewScript' => 'form/preferences_livestream.phtml']],
|
||||
]);
|
||||
|
||||
// automatic trasition on source disconnection
|
||||
$auto_transition = new Zend_Form_Element_Checkbox("auto_transition");
|
||||
$auto_transition->setLabel(_("Auto Switch Off:"))
|
||||
->setValue(Application_Model_Preference::GetAutoTransition());
|
||||
$auto_transition = new Zend_Form_Element_Checkbox('auto_transition');
|
||||
$auto_transition->setLabel(_('Auto Switch Off:'))
|
||||
->setValue(Application_Model_Preference::GetAutoTransition())
|
||||
;
|
||||
$this->addElement($auto_transition);
|
||||
|
||||
// automatic switch on upon source connection
|
||||
$auto_switch = new Zend_Form_Element_Checkbox("auto_switch");
|
||||
$auto_switch->setLabel(_("Auto Switch On:"))
|
||||
->setValue(Application_Model_Preference::GetAutoSwitch());
|
||||
$auto_switch = new Zend_Form_Element_Checkbox('auto_switch');
|
||||
$auto_switch->setLabel(_('Auto Switch On:'))
|
||||
->setValue(Application_Model_Preference::GetAutoSwitch())
|
||||
;
|
||||
$this->addElement($auto_switch);
|
||||
|
||||
// Default transition fade
|
||||
$transition_fade = new Zend_Form_Element_Text("transition_fade");
|
||||
$transition_fade->setLabel(_("Switch Transition Fade (s):"))
|
||||
->setFilters(array('StringTrim'))
|
||||
->addValidator('regex', false, array('/^\d*(\.\d+)?$/',
|
||||
'messages' => _('Please enter a time in seconds (eg. 0.5)')))
|
||||
->setValue($defaultFade);
|
||||
$transition_fade = new Zend_Form_Element_Text('transition_fade');
|
||||
$transition_fade->setLabel(_('Switch Transition Fade (s):'))
|
||||
->setFilters(['StringTrim'])
|
||||
->addValidator('regex', false, ['/^\d*(\.\d+)?$/',
|
||||
'messages' => _('Please enter a time in seconds (eg. 0.5)'), ])
|
||||
->setValue($defaultFade)
|
||||
;
|
||||
$this->addElement($transition_fade);
|
||||
|
||||
//Master username
|
||||
|
@ -40,8 +42,9 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$master_username->setAttrib('autocomplete', 'off')
|
||||
->setAllowEmpty(true)
|
||||
->setLabel(_('Username:'))
|
||||
->setFilters(array('StringTrim'))
|
||||
->setValue(Application_Model_Preference::GetLiveStreamMasterUsername());
|
||||
->setFilters(['StringTrim'])
|
||||
->setValue(Application_Model_Preference::GetLiveStreamMasterUsername())
|
||||
;
|
||||
$this->addElement($master_username);
|
||||
|
||||
//Master password
|
||||
|
@ -56,7 +59,8 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
->setAllowEmpty(true)
|
||||
->setValue(Application_Model_Preference::GetLiveStreamMasterPassword())
|
||||
->setLabel(_('Password:'))
|
||||
->setFilters(array('StringTrim'));
|
||||
->setFilters(['StringTrim'])
|
||||
;
|
||||
$this->addElement($master_password);
|
||||
|
||||
$masterSourceParams = parse_url(Application_Model_Preference::GetMasterDJSourceConnectionURL());
|
||||
|
@ -65,10 +69,10 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$masterSourceHost = new Zend_Form_Element_Text('master_source_host');
|
||||
$masterSourceHost->setLabel(_('Master Source Host:'))
|
||||
->setAttrib('readonly', true)
|
||||
->setValue(Application_Model_Preference::GetMasterDJSourceConnectionURL());
|
||||
->setValue(Application_Model_Preference::GetMasterDJSourceConnectionURL())
|
||||
;
|
||||
$this->addElement($masterSourceHost);
|
||||
|
||||
|
||||
//liquidsoap harbor.input port
|
||||
$betweenValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(1024, 49151);
|
||||
|
||||
|
@ -77,19 +81,19 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$masterSourcePort = new Zend_Form_Element_Text('master_source_port');
|
||||
$masterSourcePort->setLabel(_('Master Source Port:'))
|
||||
->setValue($m_port)
|
||||
->setValidators(array($betweenValidator))
|
||||
->addValidator('regex', false, array('pattern'=>'/^[0-9]+$/', 'messages'=>array('regexNotMatch'=>_('Only numbers are allowed.'))));
|
||||
|
||||
$this->addElement($masterSourcePort);
|
||||
|
||||
->setValidators([$betweenValidator])
|
||||
->addValidator('regex', false, ['pattern' => '/^[0-9]+$/', 'messages' => ['regexNotMatch' => _('Only numbers are allowed.')]])
|
||||
;
|
||||
|
||||
$this->addElement($masterSourcePort);
|
||||
|
||||
$m_mount = Application_Model_StreamSetting::getMasterLiveStreamMountPoint();
|
||||
$masterSourceMount = new Zend_Form_Element_Text('master_source_mount');
|
||||
$masterSourceMount->setLabel(_('Master Source Mount:'))
|
||||
->setValue($m_mount)
|
||||
->setValidators(array(
|
||||
array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))));
|
||||
->setValidators([
|
||||
['regex', false, ['/^[^ &<>]+$/', 'messages' => _('Invalid character entered')]], ])
|
||||
;
|
||||
$this->addElement($masterSourceMount);
|
||||
|
||||
$showSourceParams = parse_url(Application_Model_Preference::GetLiveDJSourceConnectionURL());
|
||||
|
@ -98,7 +102,8 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$showSourceHost = new Zend_Form_Element_Text('show_source_host');
|
||||
$showSourceHost->setLabel(_('Show Source Host:'))
|
||||
->setAttrib('readonly', true)
|
||||
->setValue(Application_Model_Preference::GetLiveDJSourceConnectionURL());
|
||||
->setValue(Application_Model_Preference::GetLiveDJSourceConnectionURL())
|
||||
;
|
||||
$this->addElement($showSourceHost);
|
||||
|
||||
//liquidsoap harbor.input port
|
||||
|
@ -107,16 +112,18 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$showSourcePort = new Zend_Form_Element_Text('show_source_port');
|
||||
$showSourcePort->setLabel(_('Show Source Port:'))
|
||||
->setValue($l_port)
|
||||
->setValidators(array($betweenValidator))
|
||||
->addValidator('regex', false, array('pattern' => '/^[0-9]+$/', 'messages' => array('regexNotMatch' => _('Only numbers are allowed.'))));
|
||||
->setValidators([$betweenValidator])
|
||||
->addValidator('regex', false, ['pattern' => '/^[0-9]+$/', 'messages' => ['regexNotMatch' => _('Only numbers are allowed.')]])
|
||||
;
|
||||
$this->addElement($showSourcePort);
|
||||
|
||||
$l_mount = Application_Model_StreamSetting::getDjLiveStreamMountPoint();
|
||||
$showSourceMount = new Zend_Form_Element_Text('show_source_mount');
|
||||
$showSourceMount->setLabel(_('Show Source Mount:'))
|
||||
->setValue($l_mount)
|
||||
->setValidators(array(
|
||||
array('regex', false, array('/^[^ &<>]+$/', 'messages' => _('Invalid character entered')))));
|
||||
->setValidators([
|
||||
['regex', false, ['/^[^ &<>]+$/', 'messages' => _('Invalid character entered')]], ])
|
||||
;
|
||||
$this->addElement($showSourceMount);
|
||||
}
|
||||
|
||||
|
@ -129,20 +136,20 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$showSourceParams = parse_url(Application_Model_Preference::GetLiveDJSourceConnectionURL());
|
||||
|
||||
$this->setDecorators(
|
||||
array(
|
||||
array('ViewScript',
|
||||
array(
|
||||
[
|
||||
['ViewScript',
|
||||
[
|
||||
'viewScript' => 'form/preferences_livestream.phtml',
|
||||
'master_source_host' => isset($masterSourceHost) ? Application_Model_Preference::GetMasterDJSourceConnectionURL() : "",
|
||||
'master_source_port' => isset($masterSourcePort) ? Application_Model_StreamSetting::getMasterLiveStreamPort() : "",
|
||||
'master_source_mount' => isset($masterSourceMount) ? Application_Model_StreamSetting::getMasterLiveStreamMountPoint() : "",
|
||||
'show_source_host' => isset($showSourceHost) ? Application_Model_Preference::GetLiveDJSourceConnectionURL() : "",
|
||||
'show_source_port' => isset($showSourcePort) ? Application_Model_StreamSetting::getDjLiveStreamPort() : "",
|
||||
'show_source_mount' => isset($showSourceMount) ? Application_Model_StreamSetting::getDjLiveStreamMountPoint() : "",
|
||||
'master_source_host' => isset($masterSourceHost) ? Application_Model_Preference::GetMasterDJSourceConnectionURL() : '',
|
||||
'master_source_port' => isset($masterSourcePort) ? Application_Model_StreamSetting::getMasterLiveStreamPort() : '',
|
||||
'master_source_mount' => isset($masterSourceMount) ? Application_Model_StreamSetting::getMasterLiveStreamMountPoint() : '',
|
||||
'show_source_host' => isset($showSourceHost) ? Application_Model_Preference::GetLiveDJSourceConnectionURL() : '',
|
||||
'show_source_port' => isset($showSourcePort) ? Application_Model_StreamSetting::getDjLiveStreamPort() : '',
|
||||
'show_source_mount' => isset($showSourceMount) ? Application_Model_StreamSetting::getDjLiveStreamMountPoint() : '',
|
||||
'isDemo' => $isDemo,
|
||||
)
|
||||
)
|
||||
)
|
||||
],
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue