CC-3356 : Library & Timeline : remove zero prefixes from numbers

This commit is contained in:
Naomi Aro 2012-02-27 20:26:47 +01:00
parent 564575d657
commit 6ecf2f94b0
1 changed files with 5 additions and 3 deletions

View File

@ -54,15 +54,17 @@ class Application_Model_ShowBuilder {
$formatted .= $sign;
if ($info[0] > 0) {
if (intval($info[0]) > 0) {
$info[0] = ltrim($info[0], "0");
$formatted .= " {$info[0]}h";
}
if ($info[1] > 0) {
if (intval($info[1]) > 0) {
$info[1] = ltrim($info[1], "0");
$formatted .= " {$info[1]}m";
}
if ($info[2] > 0) {
if (intval($info[2]) > 0) {
$sec = round($info[2], 0);
$formatted .= " {$sec}s";
}