diff --git a/airtime_mvc/application/common/Billing.php b/airtime_mvc/application/common/Billing.php index 2dbfafa9a..57c8e3cf3 100644 --- a/airtime_mvc/application/common/Billing.php +++ b/airtime_mvc/application/common/Billing.php @@ -374,4 +374,13 @@ class Billing return 0; } } + + public static function isStationPodcastAllowed() { + $planLevel = Application_Model_Preference::GetPlanLevel(); + if ($planLevel == "hobbyist") { + return false; + } else { + return true; + } + } } diff --git a/airtime_mvc/application/controllers/LibraryController.php b/airtime_mvc/application/controllers/LibraryController.php index 06139e93f..221271d81 100644 --- a/airtime_mvc/application/controllers/LibraryController.php +++ b/airtime_mvc/application/controllers/LibraryController.php @@ -446,6 +446,12 @@ class LibraryController extends Zend_Controller_Action public function publishDialogAction() { $this->_helper->layout->disableLayout(); + + if (!Billing::isStationPodcastAllowed()) { + $this->renderScript("podcast/featureupgrade-pane.phtml"); + } + + //This just spits out publish-dialog.phtml! } } diff --git a/airtime_mvc/application/controllers/PodcastController.php b/airtime_mvc/application/controllers/PodcastController.php index afc367880..6c1fd05c3 100644 --- a/airtime_mvc/application/controllers/PodcastController.php +++ b/airtime_mvc/application/controllers/PodcastController.php @@ -26,6 +26,12 @@ class PodcastController extends Zend_Controller_Action { * Renders the Station podcast view */ public function stationAction() { + + if (!Billing::isStationPodcastAllowed()) { + $this->render("featureupgrade-page"); + return; + } + $stationPodcastId = Application_Model_Preference::getStationPodcastId(); $podcast = Application_Service_PodcastService::getPodcastById($stationPodcastId); $this->view->podcast = json_encode($podcast); diff --git a/airtime_mvc/application/modules/rest/controllers/PodcastController.php b/airtime_mvc/application/modules/rest/controllers/PodcastController.php index 5acf17674..9035297bf 100644 --- a/airtime_mvc/application/modules/rest/controllers/PodcastController.php +++ b/airtime_mvc/application/modules/rest/controllers/PodcastController.php @@ -84,6 +84,7 @@ class Rest_PodcastController extends Zend_Rest_Controller $podcast = Application_Service_PodcastService::createFromFeedUrl($requestData["url"]); $path = 'podcast/podcast.phtml'; + $this->view->podcast = $podcast; $this->_helper->json->sendJson(array( "podcast"=>json_encode($podcast), @@ -176,10 +177,11 @@ class Rest_PodcastController extends Zend_Rest_Controller } break; case HttpRequestType::GET: + $path = 'podcast/podcast.phtml'; foreach($ids as $id) { $responseBody[] = array( "podcast" => json_encode(Application_Service_PodcastService::getPodcastById($id)), - "html" => $this->view->render('podcast/podcast.phtml') + "html" => $this->view->render($path) ); } break; diff --git a/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml b/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml new file mode 100644 index 000000000..afd5a7e3e --- /dev/null +++ b/airtime_mvc/application/views/scripts/podcast/featureupgrade-page.phtml @@ -0,0 +1,13 @@ + + +
With our built-in podcast, you can: +