From 67ca0db4c884feed32f224def8fe88947307f779 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 16 Oct 2012 14:09:34 -0400 Subject: [PATCH 1/9] CC-4542: Playlists containing dynamic smart blocks cannot be previewed - fixed --- .../views/scripts/playlist/update.phtml | 2 +- airtime_mvc/public/js/airtime/library/spl.js | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/views/scripts/playlist/update.phtml b/airtime_mvc/application/views/scripts/playlist/update.phtml index a51fd37db..70176ff9e 100644 --- a/airtime_mvc/application/views/scripts/playlist/update.phtml +++ b/airtime_mvc/application/views/scripts/playlist/update.phtml @@ -21,7 +21,7 @@ if ($item['type'] == 2) { -
"> +
" blocktype="">
diff --git a/airtime_mvc/public/js/airtime/library/spl.js b/airtime_mvc/public/js/airtime/library/spl.js index 5e300dea6..e79678201 100644 --- a/airtime_mvc/public/js/airtime/library/spl.js +++ b/airtime_mvc/public/js/airtime/library/spl.js @@ -393,6 +393,31 @@ var AIRTIME = (function(AIRTIME){ }, }) } + } else { + if ($(value).attr('blocktype') === 'dynamic') { + $(value).attr("class", "big_play_disabled dark_class"); + $(value).qtip({ + content: 'Dynamic block is not previewable', + show: 'mouseover', + hide: { + delay: 500, + fixed: true + }, + style: { + border: { + width: 0, + radius: 4 + }, + classes: "ui-tooltip-dark ui-tooltip-rounded" + }, + position: { + my: "left bottom", + at: "right center" + }, + }) + } else { + $(value).bind("click", openAudioPreview); + } } }); } From 846af50543749e6977cf145eff5614a87e6368ad Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 14:33:45 -0400 Subject: [PATCH 2/9] CC-4567: Calendar: Exception in zendphp.log when setting a wrong rebroadcast time from repeating show -fixed --- airtime_mvc/application/forms/AddShowWhen.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/airtime_mvc/application/forms/AddShowWhen.php b/airtime_mvc/application/forms/AddShowWhen.php index eb4e68a35..a3d445796 100644 --- a/airtime_mvc/application/forms/AddShowWhen.php +++ b/airtime_mvc/application/forms/AddShowWhen.php @@ -247,15 +247,8 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm $overlapping = Application_Model_Schedule::checkOverlappingShows($show_start, $show_end, $update, $instanceId); if (!$overlapping) { + $durationToAdd = "PT".$hours."H".$minutes."M"; for ($i = 1; $i <= 10; $i++) { - $hours = ltrim($hours, '0'); - if ($minutes != "00") { - $minutes = ltrim($minutes, '0'); - $durationToAdd = "PT".$hours."H".$minutes."I"; - } else { - $minutes = "0"; - $durationToAdd = "PT".$hours."H"; - } if (empty($formData["add_show_rebroadcast_date_absolute_".$i])) break; From 96da822bc7ca67ca9ef489588b595529bc61ea75 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 16 Oct 2012 14:38:24 -0400 Subject: [PATCH 3/9] CC-4574: Audio preview fails with Zend errors on file with question mark in the title - fixed --- airtime_mvc/public/js/airtime/common/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airtime_mvc/public/js/airtime/common/common.js b/airtime_mvc/public/js/airtime/common/common.js index aa449dddf..3125d8d55 100644 --- a/airtime_mvc/public/js/airtime/common/common.js +++ b/airtime_mvc/public/js/airtime/common/common.js @@ -54,7 +54,7 @@ function open_audio_preview(type, id, audioFileTitle, audioFileArtist) { audioFileTitle = audioFileTitle.substring(0,index); } - openPreviewWindow('audiopreview/audio-preview/audioFileID/'+id+'/audioFileArtist/'+audioFileArtist+'/audioFileTitle/'+audioFileTitle+'/type/'+type); + openPreviewWindow('audiopreview/audio-preview/audioFileID/'+id+'/audioFileArtist/'+encodeURIComponent(audioFileArtist)+'/audioFileTitle/'+encodeURIComponent(audioFileTitle)+'/type/'+type); _preview_window.focus(); } From 562c5099396ec2cd286e7b325dbbcde96736f2ee Mon Sep 17 00:00:00 2001 From: James Date: Tue, 16 Oct 2012 14:51:14 -0400 Subject: [PATCH 4/9] CC-4570: blockId and blockIndex are visible at top of smart block preview pop-up - fixed --- .../views/scripts/audiopreview/audio-preview.phtml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml index b4ec52bdf..f76249b9f 100644 --- a/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml +++ b/airtime_mvc/application/views/scripts/audiopreview/audio-preview.phtml @@ -4,8 +4,8 @@ playlistID" ?> playlistIndex" ?> blockId)): ?> - blockId" ?> - blockIndex" ?> + + uri)): ?> @@ -51,7 +51,7 @@
unmute -
+
From 25c28da7611c4cb7a8b7d897109cdb80581dc596 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 15:29:05 -0400 Subject: [PATCH 5/9] CC-4550: Track should not be a required field in metadata editor -fixed --- airtime_mvc/application/forms/EditAudioMD.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/airtime_mvc/application/forms/EditAudioMD.php b/airtime_mvc/application/forms/EditAudioMD.php index ba7b1c4ef..2dc9e1f0f 100644 --- a/airtime_mvc/application/forms/EditAudioMD.php +++ b/airtime_mvc/application/forms/EditAudioMD.php @@ -32,9 +32,7 @@ class Application_Form_EditAudioMD extends Zend_Form $this->addElement('text', 'track_number', array( 'label' => 'Track:', 'class' => 'input_text', - 'filters' => array('StringTrim'), - 'validators' => array('Int'), - 'required' => true + 'filters' => array('StringTrim') )); // Add genre field From 819dcf70fddabeab4a6231b9096a1a4cc8b51ea2 Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 15:56:03 -0400 Subject: [PATCH 6/9] CC-4579: Edit Metadata: Track number defaults to 0 if it is deleted -fixed --- airtime_mvc/application/models/StoredFile.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index cd75da2d1..2300f4eb7 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -196,6 +196,10 @@ class Application_Model_StoredFile if (isset($this->_dbMD[$dbColumn])) { $propelColumn = $this->_dbMD[$dbColumn]; $method = "set$propelColumn"; + + /* We need to set track_number to null if it is an empty string + * because propel defaults empty strings to zeros */ + if ($dbColumn == "track_number" && empty($mdValue)) $mdValue = null; $this->_file->$method($mdValue); } } From 2b1db835dd6448b229f38dada3bf0a1d033733fb Mon Sep 17 00:00:00 2001 From: denise Date: Tue, 16 Oct 2012 16:01:05 -0400 Subject: [PATCH 7/9] CC-4571: Now Playing delete action does not delete, should be labelled 'Remove from show' -done --- .../application/controllers/ShowbuilderController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/controllers/ShowbuilderController.php b/airtime_mvc/application/controllers/ShowbuilderController.php index 23c3fd55b..a31119cdb 100644 --- a/airtime_mvc/application/controllers/ShowbuilderController.php +++ b/airtime_mvc/application/controllers/ShowbuilderController.php @@ -186,13 +186,13 @@ class ShowbuilderController extends Zend_Controller_Action $menu["preview"] = array("name"=> "Preview", "icon" => "play"); //select the cursor - $menu["selCurs"] = array("name"=> "Select Cursor","icon" => "select-cursor"); - $menu["delCurs"] = array("name"=> "Remove Cursor","icon" => "select-cursor"); + $menu["selCurs"] = array("name"=> "Select cursor","icon" => "select-cursor"); + $menu["delCurs"] = array("name"=> "Remove cursor","icon" => "select-cursor"); if ($now < floatval($item->getDbEnds("U.u")) && $user->canSchedule($instance->getDbShowId())) { //remove/truncate the item from the schedule - $menu["del"] = array("name"=> "Delete", "icon" => "delete", "url" => "/showbuilder/schedule-remove"); + $menu["del"] = array("name"=> "Remove from show", "icon" => "delete", "url" => "/showbuilder/schedule-remove"); } $this->view->items = $menu; From 3f1df4922105e2985eb10683ef004146a5cb7e6e Mon Sep 17 00:00:00 2001 From: James Date: Tue, 16 Oct 2012 16:22:44 -0400 Subject: [PATCH 8/9] CC-4572: Adding a playlist to a show in Now Playing page fails, interface greys out - bug with php 5.3.2 with DateTime::createFromFormat() - fixed with workaround --- .../models/airtime/CcBlockcontents.php | 20 ++++++++++++++----- .../models/airtime/CcPlaylistcontents.php | 18 +++++++++++++---- .../application/models/airtime/CcSchedule.php | 18 +++++++++++++---- .../propel/airtime/CcPlaylistcontents.php | 18 +++++++++++++---- .../propel/airtime/CcSchedule.php | 18 +++++++++++++---- 5 files changed, 71 insertions(+), 21 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcBlockcontents.php b/airtime_mvc/application/models/airtime/CcBlockcontents.php index 5fcfbbf24..7c307610a 100644 --- a/airtime_mvc/application/models/airtime/CcBlockcontents.php +++ b/airtime_mvc/application/models/airtime/CcBlockcontents.php @@ -5,7 +5,7 @@ /** * Skeleton subclass for representing a row from the 'cc_blockcontents' table. * - * + * * * You should add additional methods to this class to meet the * application requirements. This class will only be generated as @@ -44,11 +44,16 @@ class CcBlockcontents extends BaseCcBlockcontents { */ public function setDbFadein($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -58,7 +63,7 @@ class CcBlockcontents extends BaseCcBlockcontents { } } - $this->fadein = $dt->format('H:i:s.u'); + $this->fadein = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN; return $this; @@ -72,11 +77,16 @@ class CcBlockcontents extends BaseCcBlockcontents { */ public function setDbFadeout($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -86,7 +96,7 @@ class CcBlockcontents extends BaseCcBlockcontents { } } - $this->fadeout = $dt->format('H:i:s.u'); + $this->fadeout = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT; return $this; diff --git a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php index b5125de32..1b0abe796 100644 --- a/airtime_mvc/application/models/airtime/CcPlaylistcontents.php +++ b/airtime_mvc/application/models/airtime/CcPlaylistcontents.php @@ -43,11 +43,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { */ public function setDbFadein($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -57,7 +62,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadein = $dt->format('H:i:s.u'); + $this->fadein = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN; return $this; @@ -71,11 +76,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { */ public function setDbFadeout($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -85,7 +95,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadeout = $dt->format('H:i:s.u'); + $this->fadeout = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT; return $this; diff --git a/airtime_mvc/application/models/airtime/CcSchedule.php b/airtime_mvc/application/models/airtime/CcSchedule.php index 75a01e758..7e29c7641 100644 --- a/airtime_mvc/application/models/airtime/CcSchedule.php +++ b/airtime_mvc/application/models/airtime/CcSchedule.php @@ -107,11 +107,16 @@ class CcSchedule extends BaseCcSchedule { */ public function setDbFadeIn($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -120,7 +125,7 @@ class CcSchedule extends BaseCcSchedule { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } - $this->fade_in = $dt->format('H:i:s.u'); + $this->fade_in = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcSchedulePeer::FADE_IN; return $this; @@ -134,11 +139,16 @@ class CcSchedule extends BaseCcSchedule { */ public function setDbFadeOut($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -148,7 +158,7 @@ class CcSchedule extends BaseCcSchedule { } } - $this->fade_out = $dt->format('H:i:s.u'); + $this->fade_in = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcSchedulePeer::FADE_OUT; return $this; diff --git a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php index b5125de32..1b0abe796 100644 --- a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php +++ b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcPlaylistcontents.php @@ -43,11 +43,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { */ public function setDbFadein($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -57,7 +62,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadein = $dt->format('H:i:s.u'); + $this->fadein = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN; return $this; @@ -71,11 +76,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { */ public function setDbFadeout($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -85,7 +95,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents { } } - $this->fadeout = $dt->format('H:i:s.u'); + $this->fadeout = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT; return $this; diff --git a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php index 75a01e758..6108e48af 100644 --- a/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php +++ b/install_minimal/upgrades/airtime-2.1.0/propel/airtime/CcSchedule.php @@ -107,11 +107,16 @@ class CcSchedule extends BaseCcSchedule { */ public function setDbFadeIn($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -120,7 +125,7 @@ class CcSchedule extends BaseCcSchedule { throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x); } } - $this->fade_in = $dt->format('H:i:s.u'); + $this->fade_in = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcSchedulePeer::FADE_IN; return $this; @@ -134,11 +139,16 @@ class CcSchedule extends BaseCcSchedule { */ public function setDbFadeOut($v) { + $microsecond = 0; if ($v instanceof DateTime) { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - $dt = DateTime::createFromFormat("s.u", $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); + $microsecond = $info[1]; + $dt = DateTime::createFromFormat("s", $info[0]); } else { try { @@ -148,7 +158,7 @@ class CcSchedule extends BaseCcSchedule { } } - $this->fade_out = $dt->format('H:i:s.u'); + $this->fade_out = $dt->format('H:i:s').".".$microsecond; $this->modifiedColumns[] = CcSchedulePeer::FADE_OUT; return $this; From c1745145e8512fd9bf9de2358e767af2231c6809 Mon Sep 17 00:00:00 2001 From: James Date: Tue, 16 Oct 2012 16:25:56 -0400 Subject: [PATCH 9/9] - CRLF fix --- airtime_mvc/application/models/airtime/CcSchedule.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/application/models/airtime/CcSchedule.php b/airtime_mvc/application/models/airtime/CcSchedule.php index 7e29c7641..4230c54b8 100644 --- a/airtime_mvc/application/models/airtime/CcSchedule.php +++ b/airtime_mvc/application/models/airtime/CcSchedule.php @@ -144,9 +144,9 @@ class CcSchedule extends BaseCcSchedule { $dt = $v; } else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) { - // in php 5.3.2 createFromFormat() with "u" is not supported(bug) - // Hence we need to do parsing. - $info = explode('.', $v); + // in php 5.3.2 createFromFormat() with "u" is not supported(bug) + // Hence we need to do parsing. + $info = explode('.', $v); $microsecond = $info[1]; $dt = DateTime::createFromFormat("s", $info[0]); }