Merge branch 'airtime-2.0.x' of dev.sourcefabric.org:airtime into airtime-2.0.x
This commit is contained in:
commit
cc20db5d30
7 changed files with 34 additions and 12 deletions
|
@ -81,5 +81,9 @@ class Config {
|
|||
|
||||
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
|
||||
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
|
||||
|
||||
if(isset($values['demo']['demo'])){
|
||||
$CC_CONFIG['demo'] = $values['demo']['demo'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ class LoginController extends Zend_Controller_Action
|
|||
|
||||
public function indexAction()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
if(Zend_Auth::getInstance()->hasIdentity())
|
||||
{
|
||||
$this->_redirect('Nowplaying');
|
||||
|
@ -80,11 +82,14 @@ class LoginController extends Zend_Controller_Action
|
|||
}
|
||||
}
|
||||
|
||||
$this->view->message = $message;
|
||||
$this->view->error = $error;
|
||||
$this->view->form = $form;
|
||||
$this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion();
|
||||
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;
|
||||
$this->view->message = $message;
|
||||
$this->view->error = $error;
|
||||
$this->view->form = $form;
|
||||
$this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion();
|
||||
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;
|
||||
if(isset($CC_CONFIG['demo'])){
|
||||
$this->view->demo = $CC_CONFIG['demo'];
|
||||
}
|
||||
}
|
||||
|
||||
public function logoutAction()
|
||||
|
|
|
@ -5,6 +5,8 @@ class Application_Form_Login extends Zend_Form
|
|||
|
||||
public function init()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
// Set the method for the display form to POST
|
||||
$this->setMethod('post');
|
||||
|
||||
|
@ -13,17 +15,19 @@ class Application_Form_Login extends Zend_Form
|
|||
'label' => 'Username:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
// Add password element
|
||||
$this->addElement('password', 'password', array(
|
||||
'label' => 'Password:',
|
||||
'class' => 'input_text',
|
||||
'required' => true,
|
||||
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
|
||||
'filters' => array('StringTrim'),
|
||||
'validators' => array(
|
||||
'NotEmpty',
|
||||
|
|
|
@ -39,12 +39,14 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
}
|
||||
|
||||
# tooltip
|
||||
$description = 'VLC and mplayer have a serious bug when playing an OGG/VORBIS
|
||||
stream that has metadata information enabled (stream metadata is the
|
||||
track title, show name, etc displayed in the audio player): they will
|
||||
disconnect from the stream after every song if this option is enabled.
|
||||
If your listeners do not require support for these audio players,
|
||||
then you should enable this option.';
|
||||
$description = 'This option enables metadata for OGG streams (stream
|
||||
metadata is the track title, artist, and show name that is
|
||||
displayed in an audio player). VLC and mplayer have a
|
||||
serious bug when playing an OGG/VORBIS stream that has
|
||||
metadata information enabled: they will disconnect from the
|
||||
stream after every song. If you are using an OGG stream and
|
||||
your listeners do not require support for these audio
|
||||
players, then feel free to enable this option.';
|
||||
|
||||
$icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
|
||||
$icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata')
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<div class="logobox"> </div>
|
||||
<h2>Login</h2>
|
||||
<div id="login" class="login-content clearfix">
|
||||
<?php if(isset($this->demo) && $this->demo == 1){?>
|
||||
<p style="font-weight:bold">Welcome to the online Airtime demo! You can log in using the username 'admin' and the password 'admin'.</p>
|
||||
<?php }?>
|
||||
<p class="light" style='<?php echo $this->error?"color:#902d2d;font-size:11px;padding:2px 4px;background:#c6b4b4;margin-bottom:2px;border:1px solid #c83f3f;":""?>'><?php echo $this->message; ?></p>
|
||||
<?php echo $this->form; ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue