fix indentation and remove \r characters
This commit is contained in:
parent
4d8dc01638
commit
d517bf6e19
|
@ -270,12 +270,11 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$obj = null;
|
||||
|
||||
$objInfo = $this->getObjInfo($type);
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
try {
|
||||
|
||||
Logging::log("Currently active {$type} {$this->obj_sess->id}");
|
||||
if (in_array($this->obj_sess->id, $ids)) {
|
||||
Logging::log("Deleting currently active {$type}");
|
||||
|
@ -290,11 +289,9 @@ class PlaylistController extends Zend_Controller_Action
|
|||
Application_Model_Block::deleteBlocks($ids, $userInfo->id);
|
||||
}
|
||||
$this->createFullResponse($obj);
|
||||
}
|
||||
catch (PlaylistNoPermissionException $e) {
|
||||
} catch (PlaylistNoPermissionException $e) {
|
||||
$this->playlistNoPermission($type);
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
} catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound($type);
|
||||
} catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
|
@ -524,18 +521,18 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->setPlaylistNameDescAction();
|
||||
|
||||
if ($params['type'] == 'block') {
|
||||
$form = new Application_Form_SmartBlockCriteria();
|
||||
$form = new Application_Form_SmartBlockCriteria();
|
||||
$form->startForm($params['obj_id']);
|
||||
$bl = new Application_Model_Block($params['obj_id']);
|
||||
$bl = new Application_Model_Block($params['obj_id']);
|
||||
if ($form->isValid($params)) {
|
||||
$bl->saveSmartBlockCriteria($params['data']);
|
||||
$result['html'] = $this->createFullResponse($bl, true);
|
||||
$result['result'] = 0;
|
||||
} else {
|
||||
$this->view->obj = $bl;
|
||||
$this->view->obj = $bl;
|
||||
$this->view->id = $bl->getId();
|
||||
$this->view->form = $form;
|
||||
$viewPath = 'playlist/smart-block.phtml';
|
||||
$viewPath = 'playlist/smart-block.phtml';
|
||||
$result['html'] = $this->view->render($viewPath);
|
||||
$result['result'] = 1;
|
||||
}
|
||||
|
@ -545,11 +542,11 @@ class PlaylistController extends Zend_Controller_Action
|
|||
die(json_encode($result));
|
||||
}
|
||||
|
||||
public function smartBlockGenerateAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
public function smartBlockGenerateAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$params = $request->getPost();
|
||||
$form = new Application_Form_SmartBlockCriteria();
|
||||
$form = new Application_Form_SmartBlockCriteria();
|
||||
$form->startForm($params['obj_id']);
|
||||
$bl = new Application_Model_Block($params['obj_id']);
|
||||
if ($form->isValid($params)) {
|
||||
|
@ -564,35 +561,35 @@ class PlaylistController extends Zend_Controller_Action
|
|||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}else{
|
||||
$this->view->obj = $bl;
|
||||
$this->view->id = $bl->getId();
|
||||
$this->view->form = $form;
|
||||
$viewPath = 'playlist/smart-block.phtml';
|
||||
$this->view->obj = $bl;
|
||||
$this->view->id = $bl->getId();
|
||||
$this->view->form = $form;
|
||||
$viewPath = 'playlist/smart-block.phtml';
|
||||
$result['html'] = $this->view->render($viewPath);
|
||||
$result['result'] = 1;
|
||||
die(json_encode($result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function smartBlockShuffleAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$request = $this->getRequest();
|
||||
$params = $request->getPost();
|
||||
$bl = new Application_Model_Block($params['obj_id']);
|
||||
$result = $bl->shuffleSmartBlock();
|
||||
|
||||
if ($result['result'] == 0) {
|
||||
try {
|
||||
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound('block');
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}else{
|
||||
die(json_encode($result));
|
||||
|
||||
if ($result['result'] == 0) {
|
||||
try {
|
||||
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
||||
}
|
||||
catch (PlaylistNotFoundException $e) {
|
||||
$this->playlistNotFound('block');
|
||||
}
|
||||
catch (Exception $e) {
|
||||
$this->playlistUnknownError($e);
|
||||
}
|
||||
}else{
|
||||
die(json_encode($result));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,7 +607,7 @@ class PlaylistController extends Zend_Controller_Action
|
|||
}
|
||||
|
||||
public function getBlockInfoAction(){
|
||||
$request = $this->getRequest();
|
||||
$request = $this->getRequest();
|
||||
$params = $request->getPost();
|
||||
$bl = new Application_Model_Block($params['id']);
|
||||
if ($bl->isStatic()) {
|
||||
|
|
Loading…
Reference in New Issue