CC-5762 : Playlist options validation
making sure playlist can generate with no criteria options set.
This commit is contained in:
parent
ddecfb0958
commit
a9df6bdba0
|
@ -557,8 +557,9 @@ abstract class Playlist extends BasePlaylist implements \Interface_Playlistable
|
|||
$m = $query->getModelName();
|
||||
$query->withColumn("({$m}.Cueout - {$m}.Cuein)", "cuelength");
|
||||
|
||||
//only add to where clause if criteria exist.
|
||||
if (count($criteria) > 0) {
|
||||
$criteriaRules = self::getCriteriaRules($query);
|
||||
|
||||
$conditionAnd = array();
|
||||
$conNum = 0;
|
||||
foreach ($criteria as $andBlock) {
|
||||
|
@ -579,6 +580,7 @@ abstract class Playlist extends BasePlaylist implements \Interface_Playlistable
|
|||
}
|
||||
|
||||
$query->where($conditionAnd, 'and');
|
||||
}
|
||||
|
||||
//order by a chosen column or by random.
|
||||
$order = $ruleSet["order"];
|
||||
|
|
|
@ -6,7 +6,7 @@ use Airtime\MediaItem\om\BasePlaylistPeer;
|
|||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'playlist' table.
|
||||
* Skeleton subclass for performing query and update operations on the 'media_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
|
|
@ -6,7 +6,7 @@ use Airtime\MediaItem\om\BasePlaylistQuery;
|
|||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for performing query and update operations on the 'playlist' table.
|
||||
* Skeleton subclass for performing query and update operations on the 'media_playlist' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue