summaryrefslogtreecommitdiffstats
path: root/lib.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-09-11 16:31:51 +0000
committerRomain d'Alverny <rda@mageia.org>2012-09-11 16:31:51 +0000
commit10bc4d221f7d1d057ba71af66a5370389630345f (patch)
tree2e06f62466dc49210054bb3ad413b9fceeb3fc15 /lib.php
parent281178d7a6583f4e32529af685fde55465bffdcd (diff)
downloadpkgsubmit-10bc4d221f7d1d057ba71af66a5370389630345f.tar
pkgsubmit-10bc4d221f7d1d057ba71af66a5370389630345f.tar.gz
pkgsubmit-10bc4d221f7d1d057ba71af66a5370389630345f.tar.bz2
pkgsubmit-10bc4d221f7d1d057ba71af66a5370389630345f.tar.xz
pkgsubmit-10bc4d221f7d1d057ba71af66a5370389630345f.zip
count all builds > 10 mins together
Diffstat (limited to 'lib.php')
-rw-r--r--lib.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib.php b/lib.php
index e29b3c4..d00615b 100644
--- a/lib.php
+++ b/lib.php
@@ -469,11 +469,17 @@ S;
$newdata['60 minutes'] += $count;
} else {
$d = explode(' ', $duration);
- if ($d[0] > 20) {
- if (!array_key_exists('21 minutes', $newdata)) {
- $newdata['21 minutes'] = $count;
+ if ($d[0] >= 20) {
+ if (!array_key_exists('20 minutes', $newdata)) {
+ $newdata['20 minutes'] = $count;
} else {
- $newdata['21 minutes'] += $count;
+ $newdata['20 minutes'] += $count;
+ }
+ } elseif ($d[0] >= 10) {
+ if (!array_key_exists('10 minutes', $newdata)) {
+ $newdata['10 minutes'] = $count;
+ } else {
+ $newdata['10 minutes'] += $count;
}
} else {
$newdata[$duration] = $count;
@@ -486,8 +492,10 @@ S;
foreach ($newdata as $duration => $count) {
if ($duration == '0 second')
$duration = '< 1 minute';
- elseif ($duration == '21 minutes')
- $duration = '> 20 minutes';
+ elseif ($duration == '10 minutes')
+ $duration = '>= 10 minutes';
+ elseif ($duration == '20 minutes')
+ $duration = '>= 20 minutes';
elseif ($duration == '60 minutes')
$duration = '> 1 hour';