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