From f03b875e066e6c2326f3d8c1f2486217f729da9b Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Fri, 25 Nov 2011 21:33:42 -0500 Subject: [PATCH 1/2] CC-3084: After canceling a repeating show that is being played currently, the progress bar is still going at the top Deleted show was being returned because we don't delete it from database if it's repeating, nor do we check if it's modified when querying the db. Fixed by checking modified_instance column; only return it if modified_instance != TRUE --- airtime_mvc/application/models/Show.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 1f90d15c5..bedc14a5b 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1545,7 +1545,8 @@ class Application_Model_Show { ." FROM $CC_CONFIG[showInstances] si, $CC_CONFIG[showTable] s" ." WHERE si.show_id = s.id" ." AND si.starts <= TIMESTAMP '$timeNow'" - ." AND si.ends > TIMESTAMP '$timeNow'"; + ." AND si.ends > TIMESTAMP '$timeNow'" + ." AND modified_instance != TRUE"; // Convert back to local timezone $rows = $CC_DBC->GetAll($sql); @@ -1583,6 +1584,7 @@ class Application_Model_Show { ." WHERE si.show_id = s.id" ." AND si.starts >= TIMESTAMP '$timeStart'" ." AND si.starts < TIMESTAMP $timeEnd" + ." AND modified_instance != TRUE" ." ORDER BY si.starts"; // defaults to retrieve all shows within the interval if $limit not set @@ -1605,6 +1607,9 @@ class Application_Model_Show { public static function ConvertToLocalTimeZone(&$rows, $columnsToConvert) { $timezone = date_default_timezone_get(); + if (!is_array($rows)) { + return; + } foreach($rows as &$row) { foreach($columnsToConvert as $column) { $row[$column] = Application_Model_DateHelper::ConvertToLocalDateTimeString($row[$column]); From 197997fee766ffecc5b528d03b10ba410756e448 Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Fri, 25 Nov 2011 21:52:31 -0500 Subject: [PATCH 2/2] CC-3093: SoundCloud preferences do not have email or password as required fields + firefox auto-fills the password field Mask the password instead of hiding it --- airtime_mvc/application/forms/SoundcloudPreferences.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/forms/SoundcloudPreferences.php b/airtime_mvc/application/forms/SoundcloudPreferences.php index e948ba4f4..b2840d580 100644 --- a/airtime_mvc/application/forms/SoundcloudPreferences.php +++ b/airtime_mvc/application/forms/SoundcloudPreferences.php @@ -77,8 +77,9 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm // which is something we don't want 'allowEmpty' => false, 'validators' => array( - new PasswordNotEmpty(array('UploadToSoundcloudOption'=>'1')) - ) + new ConditionalNotEmpty(array('UploadToSoundcloudOption'=>'1')) + ), + 'renderPassword' => true )); // Add the description element