CC-4203: Smart Playlist: Please support limit as 0.5 hour

-fixed
This commit is contained in:
Martin Konecny 2012-08-09 18:27:46 -04:00
parent 200eec37f6
commit 037e78730b
1 changed files with 2 additions and 2 deletions

View File

@ -944,7 +944,7 @@ EOT;
if ($data['etc']['sp_limit_value'] == "" || floatval($data['etc']['sp_limit_value']) <= 0) {
$error[] = "Limit cannot be empty or smaller than 0";
} else {
$mins = $data['etc']['sp_limit_value'] * $multiplier;
$mins = floatval($data['etc']['sp_limit_value']) * $multiplier;
if ($mins > 1440) {
$error[] = "Limit cannot be more than 24 hrs";
}
@ -1332,7 +1332,7 @@ EOT;
$limits['time'] = 1440 * 60;
$limits['items'] = $storedCrit['limit']['value'];
} else {
$limits['time'] = $storedCrit['limit']['modifier'] == "hours" ? intval($storedCrit['limit']['value']) * 60 * 60 : intval($storedCrit['limit']['value'] * 60);
$limits['time'] = $storedCrit['limit']['modifier'] == "hours" ? intval(floatval($storedCrit['limit']['value']) * 60 * 60) : intval($storedCrit['limit']['value'] * 60);
$limits['items'] = null;
}
}