indentation fixes
This commit is contained in:
parent
179aa3d739
commit
47852bce2a
1 changed files with 35 additions and 39 deletions
|
@ -112,8 +112,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$this->view->html = $this->view->render($viewPath);
|
$this->view->html = $this->view->render($viewPath);
|
||||||
unset($this->view->obj);
|
unset($this->view->obj);
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
$this->view->html = $this->view->render($viewPath);
|
$this->view->html = $this->view->render($viewPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -138,7 +137,8 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$this->createFullResponse(null);
|
$this->createFullResponse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function playlistNoPermission($p_type){
|
private function playlistNoPermission($p_type)
|
||||||
|
{
|
||||||
$this->view->error = "You don't have permission to delete selected {$p_type}(s).";
|
$this->view->error = "You don't have permission to delete selected {$p_type}(s).";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,12 +151,14 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
Logging::log("{$e->getMessage()}");
|
Logging::log("{$e->getMessage()}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private function wrongTypeToBlock($obj) {
|
private function wrongTypeToBlock($obj)
|
||||||
|
{
|
||||||
$this->view->error = "You can only add tracks to smart block.";
|
$this->view->error = "You can only add tracks to smart block.";
|
||||||
$this->createFullResponse($obj);
|
$this->createFullResponse($obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
private function wrongTypeToPlaylist($obj) {
|
private function wrongTypeToPlaylist($obj)
|
||||||
|
{
|
||||||
$this->view->error = "You can only add tracks and smart blocks to playlists.";
|
$this->view->error = "You can only add tracks and smart blocks to playlists.";
|
||||||
$this->createFullResponse($obj);
|
$this->createFullResponse($obj);
|
||||||
}
|
}
|
||||||
|
@ -283,6 +285,7 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
Logging::log("Not deleting currently active {$type}");
|
Logging::log("Not deleting currently active {$type}");
|
||||||
$obj = new $objInfo['className']($this->obj_sess->id);
|
$obj = new $objInfo['className']($this->obj_sess->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp($objInfo['className'], 'Application_Model_Playlist')==0) {
|
if (strcmp($objInfo['className'], 'Application_Model_Playlist')==0) {
|
||||||
Application_Model_Playlist::deletePlaylists($ids, $userInfo->id);
|
Application_Model_Playlist::deletePlaylists($ids, $userInfo->id);
|
||||||
} else {
|
} else {
|
||||||
|
@ -333,11 +336,9 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
throw new BlockDynamicException;
|
throw new BlockDynamicException;
|
||||||
}
|
}
|
||||||
$this->createUpdateResponse($obj);
|
$this->createUpdateResponse($obj);
|
||||||
}
|
} catch (PlaylistOutDatedException $e) {
|
||||||
catch (PlaylistOutDatedException $e) {
|
|
||||||
$this->playlistOutdated($e);
|
$this->playlistOutdated($e);
|
||||||
}
|
} catch (PlaylistNotFoundException $e) {
|
||||||
catch (PlaylistNotFoundException $e) {
|
|
||||||
$this->playlistNotFound($obj_type);
|
$this->playlistNotFound($obj_type);
|
||||||
}
|
}
|
||||||
catch (WrongTypeToBlockException $e) {
|
catch (WrongTypeToBlockException $e) {
|
||||||
|
@ -553,11 +554,9 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
$result = $bl->generateSmartBlock($params['data']);
|
$result = $bl->generateSmartBlock($params['data']);
|
||||||
try {
|
try {
|
||||||
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
||||||
}
|
} catch (PlaylistNotFoundException $e) {
|
||||||
catch (PlaylistNotFoundException $e) {
|
|
||||||
$this->playlistNotFound('block');
|
$this->playlistNotFound('block');
|
||||||
}
|
} catch (Exception $e) {
|
||||||
catch (Exception $e) {
|
|
||||||
$this->playlistUnknownError($e);
|
$this->playlistUnknownError($e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -581,13 +580,9 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
if ($result['result'] == 0) {
|
if ($result['result'] == 0) {
|
||||||
try {
|
try {
|
||||||
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
die(json_encode(array("result"=>0, "html"=>$this->createFullResponse($bl, true))));
|
||||||
}
|
} catch (PlaylistNotFoundException $e) {
|
||||||
catch (PlaylistNotFoundException $e) {
|
|
||||||
$this->playlistNotFound('block');
|
$this->playlistNotFound('block');
|
||||||
}
|
}
|
||||||
catch (Exception $e) {
|
|
||||||
$this->playlistUnknownError($e);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
die(json_encode($result));
|
die(json_encode($result));
|
||||||
}
|
}
|
||||||
|
@ -606,7 +601,8 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBlockInfoAction(){
|
public function getBlockInfoAction()
|
||||||
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$params = $request->getPost();
|
$params = $request->getPost();
|
||||||
$bl = new Application_Model_Block($params['id']);
|
$bl = new Application_Model_Block($params['id']);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue