CC-4207: Smart Playlists: Criteria is lost on 'Shuffle' click
-fixed
This commit is contained in:
parent
7d73f0996c
commit
bd966915ee
|
@ -565,8 +565,15 @@ class PlaylistController extends Zend_Controller_Action
|
||||||
{
|
{
|
||||||
$request = $this->getRequest();
|
$request = $this->getRequest();
|
||||||
$params = $request->getPost();
|
$params = $request->getPost();
|
||||||
$bl = new Application_Model_Block($params['obj_id']);
|
$bl = new Application_Model_Block($params['obj_id']);
|
||||||
$result = $bl->shuffleSmartBlock();
|
|
||||||
|
//we need to save criteria in case user hasn't clicked Save or Generate yet
|
||||||
|
$result = $bl->saveSmartBlockCriteria($params['data']);
|
||||||
|
|
||||||
|
//only shuffle if there are no criteria errors
|
||||||
|
if ($result['result'] == 0) {
|
||||||
|
$result = $bl->shuffleSmartBlock();
|
||||||
|
}
|
||||||
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))));
|
||||||
|
|
Loading…
Reference in New Issue