parent
624986e973
commit
14712d4d78
|
@ -1099,6 +1099,7 @@ class Application_Model_Playlist
|
|||
}
|
||||
|
||||
$qry = CcFilesQuery::create();
|
||||
if (isset($storedCrit["crit"])) {
|
||||
foreach ($storedCrit["crit"] as $criteria) {
|
||||
$spCriteriaPhpName = self::$criteria2PeerMap[$criteria['criteria']];
|
||||
$spCriteria = $criteria['criteria'];
|
||||
|
@ -1122,8 +1123,10 @@ class Application_Model_Playlist
|
|||
Logging::log($e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// construct limit restriction
|
||||
$limits = array();
|
||||
if (isset($storedCrit['limit'])) {
|
||||
if ($storedCrit['limit']['modifier'] == "items") {
|
||||
$limits['time'] = 1440 * 60;
|
||||
$limits['items'] = $storedCrit['limit']['value'];
|
||||
|
@ -1131,6 +1134,7 @@ class Application_Model_Playlist
|
|||
$limits['time'] = $storedCrit['limit']['modifier'] == "hours" ? intval($storedCrit['limit']['value']) * 60 * 60 : intval($storedCrit['limit']['value'] * 60);
|
||||
$limits['items'] = null;
|
||||
}
|
||||
}
|
||||
try{
|
||||
$out = $qry->setFormatter(ModelCriteria::FORMAT_ON_DEMAND)->find();
|
||||
return array("files"=>$out, "limit"=>$limits, "count"=>$out->count());
|
||||
|
|
Loading…
Reference in New Issue