Merge branch 'airtime-2.0.x' of dev.sourcefabric.org:airtime into airtime-2.0.x

This commit is contained in:
Naomi Aro 2012-01-18 16:22:22 +01:00
commit cc20db5d30
7 changed files with 34 additions and 12 deletions

View file

@ -81,5 +81,9 @@ class Config {
$CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries']; $CC_CONFIG['soundcloud-connection-retries'] = $values['soundcloud']['connection_retries'];
$CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries']; $CC_CONFIG['soundcloud-connection-wait'] = $values['soundcloud']['time_between_retries'];
if(isset($values['demo']['demo'])){
$CC_CONFIG['demo'] = $values['demo']['demo'];
}
} }
} }

View file

@ -10,6 +10,8 @@ class LoginController extends Zend_Controller_Action
public function indexAction() public function indexAction()
{ {
global $CC_CONFIG;
if(Zend_Auth::getInstance()->hasIdentity()) if(Zend_Auth::getInstance()->hasIdentity())
{ {
$this->_redirect('Nowplaying'); $this->_redirect('Nowplaying');
@ -80,11 +82,14 @@ class LoginController extends Zend_Controller_Action
} }
} }
$this->view->message = $message; $this->view->message = $message;
$this->view->error = $error; $this->view->error = $error;
$this->view->form = $form; $this->view->form = $form;
$this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion(); $this->view->airtimeVersion = Application_Model_Preference::GetAirtimeVersion();
$this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE; $this->view->airtimeCopyright = AIRTIME_COPYRIGHT_DATE;
if(isset($CC_CONFIG['demo'])){
$this->view->demo = $CC_CONFIG['demo'];
}
} }
public function logoutAction() public function logoutAction()

View file

@ -5,6 +5,8 @@ class Application_Form_Login extends Zend_Form
public function init() public function init()
{ {
global $CC_CONFIG;
// Set the method for the display form to POST // Set the method for the display form to POST
$this->setMethod('post'); $this->setMethod('post');
@ -13,17 +15,19 @@ class Application_Form_Login extends Zend_Form
'label' => 'Username:', 'label' => 'Username:',
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',
) )
)); ));
// Add password element // Add password element
$this->addElement('password', 'password', array( $this->addElement('password', 'password', array(
'label' => 'Password:', 'label' => 'Password:',
'class' => 'input_text', 'class' => 'input_text',
'required' => true, 'required' => true,
'value' => (isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1)?'admin':'',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',

View file

@ -39,12 +39,14 @@ class Application_Form_StreamSetting extends Zend_Form
} }
# tooltip # tooltip
$description = 'VLC and mplayer have a serious bug when playing an OGG/VORBIS $description = 'This option enables metadata for OGG streams (stream
stream that has metadata information enabled (stream metadata is the metadata is the track title, artist, and show name that is
track title, show name, etc displayed in the audio player): they will displayed in an audio player). VLC and mplayer have a
disconnect from the stream after every song if this option is enabled. serious bug when playing an OGG/VORBIS stream that has
If your listeners do not require support for these audio players, metadata information enabled: they will disconnect from the
then you should enable this option.'; 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 = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
$icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata') $icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata')

View file

@ -2,6 +2,9 @@
<div class="logobox">&nbsp;</div> <div class="logobox">&nbsp;</div>
<h2>Login</h2> <h2>Login</h2>
<div id="login" class="login-content clearfix"> <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> <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; ?> <?php echo $this->form; ?>
</div> </div>

View file

@ -99,6 +99,8 @@ class AirtimeInstall{
public static function MigrateTablesToVersion($dir, $version) public static function MigrateTablesToVersion($dir, $version)
{ {
echo "Upgrading database, may take several minutes, please wait".PHP_EOL;
$appDir = AirtimeInstall::GetAirtimeSrcDir(); $appDir = AirtimeInstall::GetAirtimeSrcDir();
$SCRIPTPATH = __DIR__; $SCRIPTPATH = __DIR__;
$command = "php --php-ini $SCRIPTPATH/../../airtime-php.ini ". $command = "php --php-ini $SCRIPTPATH/../../airtime-php.ini ".

View file

@ -56,6 +56,8 @@ class UpgradeCommon{
public static function MigrateTablesToVersion($dir, $version) public static function MigrateTablesToVersion($dir, $version)
{ {
echo "Upgrading database, may take several minutes, please wait".PHP_EOL;
$appDir = self::GetAirtimeSrcDir(); $appDir = self::GetAirtimeSrcDir();
$command = "php --php-ini $dir/../../airtime-php.ini ". $command = "php --php-ini $dir/../../airtime-php.ini ".
"$appDir/library/doctrine/migrations/doctrine-migrations.phar ". "$appDir/library/doctrine/migrations/doctrine-migrations.phar ".