CC-4149: Playlist Builder: Fail to generate Smart Playlist with 5000 items

- set the items limit to 500
This commit is contained in:
James 2012-08-07 14:53:07 -04:00
parent d05661afff
commit 2f8d0b77fa
1 changed files with 9 additions and 7 deletions

View File

@ -294,7 +294,7 @@ EOT;
return array($value, $modifier);
}
//
// this function returns sum of all track length under this block.
public function getStaticLength(){
$sql = "SELECT SUM(cliplength) as length FROM cc_blockcontents WHERE block_id={$this->id}";
$r = $this->con->query($sql);
@ -951,8 +951,10 @@ EOT;
} else {
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
$error[] = "Limit cannot be empty or smaller than 0";
} else if (floatval($data['etc']['sp_limit_value']) < 1) {
} else if (!ctype_digit($data['etc']['sp_limit_value'])) {
$error[] = "The value should be an integer";
} else if (intval($data['etc']['sp_limit_value']) > 500) {
$error[] = "500 is the max item limit value you can set";
}
}