Merge branch 'airtime-2.0.x' into devel
This commit is contained in:
commit
087d893a60
|
@ -43,7 +43,7 @@ Linked code:
|
||||||
* Phing
|
* Phing
|
||||||
- What is it: PHP project build system
|
- What is it: PHP project build system
|
||||||
- Web site: http://phing.info/trac/
|
- Web site: http://phing.info/trac/
|
||||||
- Note: Only used for database installation and development, not needed to run Airtime.
|
- Note: Only used for development, not needed to run Airtime.
|
||||||
- License: LGPLv3
|
- License: LGPLv3
|
||||||
|
|
||||||
* PHP-AMQPLIB
|
* PHP-AMQPLIB
|
||||||
|
@ -175,7 +175,7 @@ Non-linked code:
|
||||||
- Web site: http://www.python.org/
|
- Web site: http://www.python.org/
|
||||||
- License: PSF License. See http://docs.python.org/license.html
|
- License: PSF License. See http://docs.python.org/license.html
|
||||||
|
|
||||||
* Liquidsoap (pre-release of 1.0)
|
* Liquidsoap 1.0.0
|
||||||
- Web site: http://savonet.sourceforge.net/
|
- Web site: http://savonet.sourceforge.net/
|
||||||
- License: GPLv2
|
- License: GPLv2
|
||||||
|
|
||||||
|
|
|
@ -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'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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',
|
||||||
|
|
|
@ -298,9 +298,11 @@ class Application_Model_Show {
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
|
|
||||||
$sql = "SELECT starts FROM cc_show_instances "
|
$sql = "SELECT starts FROM cc_show_instances "
|
||||||
."WHERE show_id = $showId AND rebroadcast = 1 "
|
."WHERE instance_id = (SELECT id FROM cc_show_instances WHERE show_id = $showId ORDER BY starts LIMIT 1) AND rebroadcast = 1 "
|
||||||
."ORDER BY starts";
|
."ORDER BY starts";
|
||||||
|
|
||||||
|
Logging::log($sql);
|
||||||
|
|
||||||
$rebroadcasts = $CC_DBC->GetAll($sql);
|
$rebroadcasts = $CC_DBC->GetAll($sql);
|
||||||
|
|
||||||
$rebroadcastsLocal = array();
|
$rebroadcastsLocal = array();
|
||||||
|
@ -415,8 +417,7 @@ class Application_Model_Show {
|
||||||
public function deleteAllInstances(){
|
public function deleteAllInstances(){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
$sql = "DELETE FROM cc_show_instances"
|
||||||
|
@ -433,8 +434,7 @@ class Application_Model_Show {
|
||||||
public function deleteAllRebroadcasts(){
|
public function deleteAllRebroadcasts(){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances"
|
$sql = "DELETE FROM cc_show_instances"
|
||||||
|
@ -457,8 +457,7 @@ class Application_Model_Show {
|
||||||
public function removeAllInstancesFromDate($p_date=null){
|
public function removeAllInstancesFromDate($p_date=null){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
if(is_null($p_date)) {
|
if(is_null($p_date)) {
|
||||||
$date = new Application_Model_DateHelper;
|
$date = new Application_Model_DateHelper;
|
||||||
|
@ -490,8 +489,7 @@ class Application_Model_Show {
|
||||||
public function removeAllInstancesBeforeDate($p_date){
|
public function removeAllInstancesBeforeDate($p_date){
|
||||||
global $CC_DBC;
|
global $CC_DBC;
|
||||||
|
|
||||||
$date = new Application_Model_DateHelper;
|
$timestamp = gmdate("Y-m-d H:i:s");
|
||||||
$timestamp = $date->getTimestamp();
|
|
||||||
|
|
||||||
$showId = $this->getId();
|
$showId = $this->getId();
|
||||||
$sql = "DELETE FROM cc_show_instances "
|
$sql = "DELETE FROM cc_show_instances "
|
||||||
|
|
|
@ -494,7 +494,12 @@ class Application_Model_ShowInstance {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$show->delete();
|
if ($this->isRebroadcast()) {
|
||||||
|
$this->_showInstance->delete();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$show->delete();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,9 @@
|
||||||
<div class="logobox"> </div>
|
<div class="logobox"> </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>
|
||||||
|
|
|
@ -181,7 +181,7 @@ function setAddShowEvents() {
|
||||||
|
|
||||||
form.find("#add_show_start_time").timepicker({
|
form.find("#add_show_start_time").timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
defaultTime: '00:00',
|
defaultTime: '00:00'
|
||||||
});
|
});
|
||||||
form.find("#add_show_end_time").timepicker({
|
form.find("#add_show_end_time").timepicker({
|
||||||
amPmText: ['', '']
|
amPmText: ['', '']
|
||||||
|
|
Loading…
Reference in New Issue