Merge branch 'saas-dev' of github.com:sourcefabric/Airtime into saas-dev
This commit is contained in:
commit
f05157c376
10 changed files with 110 additions and 37 deletions
|
@ -30,6 +30,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
->addActionContext('get-block-info', 'json')
|
||||
->addActionContext('shuffle', 'json')
|
||||
->addActionContext('empty-content', 'json')
|
||||
->addActionContext('change-playlist', 'json')
|
||||
->initContext();
|
||||
|
||||
//This controller writes to the session all over the place, so we're going to reopen it for writing here.
|
||||
|
@ -201,6 +202,16 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->createFullResponse($obj);
|
||||
}
|
||||
|
||||
public function changePlaylistAction() {
|
||||
$this->view->layout()->disableLayout(); // Don't inject the standard Now Playing header.
|
||||
$this->_helper->viewRenderer->setNoRender(true); // Don't use (phtml) templates
|
||||
|
||||
$id = $this->_getParam('id', null);
|
||||
$type = $this->_getParam('type');
|
||||
|
||||
Application_Model_Library::changePlaylist($id, $type);
|
||||
}
|
||||
|
||||
public function editAction()
|
||||
{
|
||||
$id = $this->_getParam('id', null);
|
||||
|
@ -241,7 +252,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
Logging::info("Currently active {$type} {$obj_sess->id}");
|
||||
if (in_array($obj_sess->id, $ids)) {
|
||||
Logging::info("Deleting currently active {$type}");
|
||||
Application_Model_Library::changePlaylist(null, $type);
|
||||
// Application_Model_Library::changePlaylist(null, $type);
|
||||
} else {
|
||||
Logging::info("Not deleting currently active {$type}");
|
||||
$obj = new $objInfo['className']($obj_sess->id);
|
||||
|
|
|
@ -82,7 +82,7 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
* @param string $module
|
||||
* @return void
|
||||
**/
|
||||
public function setErrorPage($action, $controller = 'error', $module = null)
|
||||
public function setErrorPage($action, $controller = 'error', $module = 'default')
|
||||
{
|
||||
$this->_errorPage = array('module' => $module,
|
||||
'controller' => $controller,
|
||||
|
@ -204,11 +204,8 @@ class Zend_Controller_Plugin_Acl extends Zend_Controller_Plugin_Abstract
|
|||
$resourceName,
|
||||
$request->getActionName())) {
|
||||
/** Redirect to access denied page */
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(403)
|
||||
->appendBody("You don't have permission to access this resource.")
|
||||
->sendResponse();
|
||||
// $this->denyAccess(); /* This results in a 404! */
|
||||
$this->setErrorPage('error403');
|
||||
$this->denyAccess(); /* This results in a 404! */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue