* Initial podcast skeleton functionality
* Rename SoundCloud/Celery classes to fit conventions * Small fixes to Table class functionality
This commit is contained in:
parent
d95b5a9034
commit
be39b6b7c0
15 changed files with 168 additions and 29 deletions
|
@ -14,8 +14,7 @@ if (!isset($configRun) || !$configRun) {
|
|||
require_once 'autoload.php';
|
||||
|
||||
require_once CONFIG_PATH . "constants.php";
|
||||
require_once 'Preference.php';
|
||||
require_once 'Locale.php';
|
||||
/* Common */
|
||||
require_once "DateHelper.php";
|
||||
require_once "LocaleHelper.php";
|
||||
require_once "FileDataHelper.php";
|
||||
|
@ -27,15 +26,20 @@ require_once "ProvisioningHelper.php";
|
|||
require_once "SecurityHelper.php";
|
||||
require_once "GoogleAnalytics.php";
|
||||
require_once "Timezone.php";
|
||||
require_once "Auth.php";
|
||||
require_once "interface/OAuth2.php";
|
||||
require_once "interface/OAuth2Controller.php";
|
||||
require_once "CeleryManager.php";
|
||||
require_once "TaskManager.php";
|
||||
require_once "UsabilityHints.php";
|
||||
require_once "MediaType.php";
|
||||
require_once __DIR__.'/models/formatters/LengthFormatter.php';
|
||||
require_once __DIR__.'/services/CeleryManager.php';
|
||||
require_once __DIR__.'/services/SoundcloudService.php';
|
||||
/* Models */
|
||||
require_once "Auth.php";
|
||||
require_once 'Preference.php';
|
||||
require_once 'Locale.php';
|
||||
/* Enums */
|
||||
require_once "MediaType.php";
|
||||
/* Interfaces */
|
||||
require_once "OAuth2.php";
|
||||
require_once "OAuth2Controller.php";
|
||||
|
||||
require_once __DIR__.'/forms/helpers/ValidationTypes.php';
|
||||
require_once __DIR__.'/forms/helpers/CustomDecorators.php';
|
||||
require_once __DIR__.'/controllers/plugins/RabbitMqPlugin.php';
|
||||
|
|
|
@ -41,6 +41,7 @@ $ccAcl->add(new Zend_Acl_Resource('library'))
|
|||
->add(new Zend_Acl_Resource('thank-you'))
|
||||
->add(new Zend_Acl_Resource('provisioning'))
|
||||
->add(new Zend_Acl_Resource('player'))
|
||||
->add(new Zend_Acl_Resource('render'))
|
||||
->add(new Zend_Acl_Resource('soundcloud'))
|
||||
->add(new Zend_Acl_Resource('embeddablewidgets'))
|
||||
->add(new Zend_Acl_Resource('setup'));
|
||||
|
@ -52,6 +53,7 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('G', 'error')
|
||||
->allow('G', 'user', 'edit-user')
|
||||
->allow('G', 'showbuilder')
|
||||
->allow('G', 'render')
|
||||
->allow('G', 'api')
|
||||
->allow('G', 'schedule')
|
||||
->allow('G', 'dashboard')
|
||||
|
@ -63,13 +65,16 @@ $ccAcl->allow('G', 'index')
|
|||
->allow('G', 'downgrade')
|
||||
->allow('G', 'rest:show-image', 'get')
|
||||
->allow('G', 'rest:media', 'get')
|
||||
->allow('G', 'rest:podcast', 'index')
|
||||
// ->allow('G', 'rest:podcast', 'index')
|
||||
->allow('G', 'rest:podcast', 'get')
|
||||
->allow('G', 'rest:podcast-episodes', 'get')
|
||||
->allow('G', 'setup')
|
||||
->allow('G', 'embeddablewidgets')
|
||||
->allow('H', 'soundcloud')
|
||||
->allow('H', 'rest:show-image')
|
||||
->allow('H', 'rest:media')
|
||||
->allow('H', 'rest:podcast')
|
||||
->allow('H', 'rest:podcast-episodes')
|
||||
->allow('H', 'preference', 'is-import-in-progress')
|
||||
->allow('H', 'usersettings')
|
||||
->allow('H', 'plupload')
|
||||
|
|
|
@ -133,7 +133,7 @@ class LibraryController extends Zend_Controller_Action
|
|||
// SOUNDCLOUD MENU OPTION
|
||||
$ownerId = empty($obj) ? $file->getFileOwnerId() : $obj->getCreatorId();
|
||||
if ($isAdminOrPM || $ownerId == $user->getId()) {
|
||||
$soundcloudService = new SoundcloudService();
|
||||
$soundcloudService = new Application_Service_SoundcloudService();
|
||||
if ($type === "audioclip" && $soundcloudService->hasAccessToken()) {
|
||||
|
||||
//create a menu separator
|
||||
|
|
|
@ -65,12 +65,13 @@ class ShowbuilderController extends Zend_Controller_Action
|
|||
|
||||
// MEDIA BUILDER
|
||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/spl.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/library/podcast.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headScript()->appendFile($baseUrl.'js/airtime/playlist/smart_blockbuilder.js?'.$CC_CONFIG['airtime_version'], 'text/javascript');
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/playlist_builder.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/jquery.ui.timepicker.css?'.$CC_CONFIG['airtime_version']);
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/showbuilder.css?'.$CC_CONFIG['airtime_version']);
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/dashboard.css?'.$CC_CONFIG['airtime_version']); // TODO
|
||||
$this->view->headLink()->appendStylesheet($baseUrl.'css/dashboard.css?'.$CC_CONFIG['airtime_version']);
|
||||
|
||||
$csrf_namespace = new Zend_Session_Namespace('csrf_namespace');
|
||||
$csrf_element = new Zend_Form_Element_Hidden('csrf');
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once "ise/php-soundcloud/src/Soundcloud/Service.php";
|
|||
class SoundcloudController extends ThirdPartyController implements OAuth2Controller {
|
||||
|
||||
/**
|
||||
* @var SoundcloudService
|
||||
* @var Application_Service_SoundcloudService
|
||||
*/
|
||||
protected $_service;
|
||||
|
||||
|
@ -20,7 +20,7 @@ class SoundcloudController extends ThirdPartyController implements OAuth2Control
|
|||
*/
|
||||
public function init() {
|
||||
parent::init();
|
||||
$this->_service = new SoundcloudService();
|
||||
$this->_service = new Application_Service_SoundcloudService();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,7 +11,7 @@ abstract class ThirdPartyController extends Zend_Controller_Action {
|
|||
protected $_baseUrl;
|
||||
|
||||
/**
|
||||
* @var ThirdPartyService third party service object
|
||||
* @var Application_Service_ThirdPartyService third party service object
|
||||
*/
|
||||
protected $_service;
|
||||
|
||||
|
|
|
@ -7,12 +7,12 @@ class CeleryServiceFactory {
|
|||
*
|
||||
* @param $serviceName string the name of the service to create
|
||||
*
|
||||
* @return ThirdPartyCeleryService|null
|
||||
* @return Application_Service_ThirdPartyCeleryService|null
|
||||
*/
|
||||
public static function getService($serviceName) {
|
||||
switch($serviceName) {
|
||||
case SOUNDCLOUD_SERVICE_NAME:
|
||||
return new SoundcloudService();
|
||||
return new Application_Service_SoundcloudService();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "ThirdPartyCeleryService.php";
|
||||
|
||||
class SoundcloudService extends ThirdPartyCeleryService implements OAuth2 {
|
||||
class Application_Service_SoundcloudService extends Application_Service_ThirdPartyCeleryService implements OAuth2 {
|
||||
|
||||
/**
|
||||
* @var string service access token for accessing remote API
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require_once "ThirdPartyService.php";
|
||||
|
||||
abstract class ThirdPartyCeleryService extends ThirdPartyService {
|
||||
abstract class Application_Service_ThirdPartyCeleryService extends Application_Service_ThirdPartyService {
|
||||
|
||||
/**
|
||||
* @var string broker exchange name for third-party tasks
|
||||
|
|
|
@ -8,7 +8,7 @@ class ServiceNotFoundException extends Exception {}
|
|||
/**
|
||||
* Class ThirdPartyService generic superclass for third-party services
|
||||
*/
|
||||
abstract class ThirdPartyService {
|
||||
abstract class Application_Service_ThirdPartyService {
|
||||
|
||||
/**
|
||||
* @var string service access token for accessing third-party API
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<fieldset class="padded">
|
||||
<dl class="zend_form">
|
||||
<?php
|
||||
$soundcloudService = new SoundcloudService();
|
||||
$soundcloudService = new Application_Service_SoundcloudService();
|
||||
if ($soundcloudService->hasAccessToken()) {
|
||||
echo $this->element->getElement('SoundCloudDisconnect')->render();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue