From 908401841b3a542be776436e653673fa94a0e96c Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 17 Jan 2012 11:34:26 +0000 Subject: [PATCH 1/5] Removed mention of phing from license file (CC-3237) --- LICENSE_3RD_PARTY | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index 9bc1f8019..e714e7978 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -40,12 +40,6 @@ Linked code: - License: MIT/Expat License - Compatible with the GPL: Yes. See http://www.gnu.org/licenses/license-list.html - * Phing - - What is it: PHP project build system - - Web site: http://phing.info/trac/ - - Note: Only used for database installation and development, not needed to run Airtime. - - License: LGPLv3 - * PHP-AMQPLIB - What is it: PHP library to interact with RabbitMQ - Web site: https://github.com/tnc/php-amqplib @@ -175,7 +169,7 @@ Non-linked code: - Web site: http://www.python.org/ - 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/ - License: GPLv2 From a69be24831737dd0d5a641637d98ab776f87ee3f Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 17 Jan 2012 12:45:05 +0100 Subject: [PATCH 2/5] CC-3256 : Recorded/repeated/rebroadcast is invalid after show update only the original rebroadcasts are left when toggling the repeat option. --- airtime_mvc/application/models/Show.php | 16 +++++++--------- .../public/js/airtime/schedule/add-show.js | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index a5b17ffc1..31bd75d44 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -298,9 +298,11 @@ class Application_Model_Show { $showId = $this->getId(); $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"; + Logging::log($sql); + $rebroadcasts = $CC_DBC->GetAll($sql); $rebroadcastsLocal = array(); @@ -415,8 +417,7 @@ class Application_Model_Show { public function deleteAllInstances(){ global $CC_DBC; - $date = new Application_Model_DateHelper; - $timestamp = $date->getTimestamp(); + $timestamp = gmdate("Y-m-d H:i:s"); $showId = $this->getId(); $sql = "DELETE FROM cc_show_instances" @@ -433,8 +434,7 @@ class Application_Model_Show { public function deleteAllRebroadcasts(){ global $CC_DBC; - $date = new Application_Model_DateHelper; - $timestamp = $date->getTimestamp(); + $timestamp = gmdate("Y-m-d H:i:s"); $showId = $this->getId(); $sql = "DELETE FROM cc_show_instances" @@ -457,8 +457,7 @@ class Application_Model_Show { public function removeAllInstancesFromDate($p_date=null){ global $CC_DBC; - $date = new Application_Model_DateHelper; - $timestamp = $date->getTimestamp(); + $timestamp = gmdate("Y-m-d H:i:s"); if(is_null($p_date)) { $date = new Application_Model_DateHelper; @@ -490,8 +489,7 @@ class Application_Model_Show { public function removeAllInstancesBeforeDate($p_date){ global $CC_DBC; - $date = new Application_Model_DateHelper; - $timestamp = $date->getTimestamp(); + $timestamp = gmdate("Y-m-d H:i:s"); $showId = $this->getId(); $sql = "DELETE FROM cc_show_instances " diff --git a/airtime_mvc/public/js/airtime/schedule/add-show.js b/airtime_mvc/public/js/airtime/schedule/add-show.js index 7ff725335..ae908e7a1 100644 --- a/airtime_mvc/public/js/airtime/schedule/add-show.js +++ b/airtime_mvc/public/js/airtime/schedule/add-show.js @@ -180,7 +180,7 @@ function setAddShowEvents() { form.find("#add_show_start_time").timepicker({ amPmText: ['', ''], - defaultTime: '00:00', + defaultTime: '00:00' }); form.find("#add_show_end_time").timepicker({ amPmText: ['', ''] From 7a9b1710ad0a5e9c96f009df27705491e8a49eac Mon Sep 17 00:00:00 2001 From: Daniel James Date: Tue, 17 Jan 2012 12:05:19 +0000 Subject: [PATCH 3/5] Updated information about phing (CC-3237) --- LICENSE_3RD_PARTY | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LICENSE_3RD_PARTY b/LICENSE_3RD_PARTY index e714e7978..f935ac900 100644 --- a/LICENSE_3RD_PARTY +++ b/LICENSE_3RD_PARTY @@ -40,6 +40,12 @@ Linked code: - License: MIT/Expat License - Compatible with the GPL: Yes. See http://www.gnu.org/licenses/license-list.html + * Phing + - What is it: PHP project build system + - Web site: http://phing.info/trac/ + - Note: Only used for development, not needed to run Airtime. + - License: LGPLv3 + * PHP-AMQPLIB - What is it: PHP library to interact with RabbitMQ - Web site: https://github.com/tnc/php-amqplib From 3588cca6549b853a23f6a8b11ab00f392a396d7c Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 17 Jan 2012 14:11:12 +0100 Subject: [PATCH 4/5] CC-3258 : Deleting a rebroadcasting show deletes also the recorded show --- airtime_mvc/application/models/ShowInstance.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/ShowInstance.php b/airtime_mvc/application/models/ShowInstance.php index 78baca4ae..de62f7c83 100644 --- a/airtime_mvc/application/models/ShowInstance.php +++ b/airtime_mvc/application/models/ShowInstance.php @@ -494,7 +494,12 @@ class Application_Model_ShowInstance { } } else { - $show->delete(); + if ($this->isRebroadcast()) { + $this->_showInstance->delete(); + } + else { + $show->delete(); + } } } From 3a8ba36e0d46ba789858caa793e5aafc59024aae Mon Sep 17 00:00:00 2001 From: James Date: Tue, 17 Jan 2012 14:47:26 -0500 Subject: [PATCH 5/5] SAAS-155: Add possibility to show additional information on login page (for demo site) - username and password are auto filled on demo site - added informative msg on demo site about username and password --- airtime_mvc/application/configs/conf.php | 4 ++++ .../application/controllers/LoginController.php | 15 ++++++++++----- airtime_mvc/application/forms/Login.php | 6 +++++- .../application/views/scripts/login/index.phtml | 3 +++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/airtime_mvc/application/configs/conf.php b/airtime_mvc/application/configs/conf.php index 10668cd68..3eb436520 100644 --- a/airtime_mvc/application/configs/conf.php +++ b/airtime_mvc/application/configs/conf.php @@ -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']; + } } } diff --git a/airtime_mvc/application/controllers/LoginController.php b/airtime_mvc/application/controllers/LoginController.php index 87ddc30a2..b8c786be9 100644 --- a/airtime_mvc/application/controllers/LoginController.php +++ b/airtime_mvc/application/controllers/LoginController.php @@ -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() diff --git a/airtime_mvc/application/forms/Login.php b/airtime_mvc/application/forms/Login.php index 52323a666..c288b8b37 100644 --- a/airtime_mvc/application/forms/Login.php +++ b/airtime_mvc/application/forms/Login.php @@ -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', diff --git a/airtime_mvc/application/views/scripts/login/index.phtml b/airtime_mvc/application/views/scripts/login/index.phtml index ea6c24e41..bde3fb9f9 100644 --- a/airtime_mvc/application/views/scripts/login/index.phtml +++ b/airtime_mvc/application/views/scripts/login/index.phtml @@ -2,6 +2,9 @@
 

Login