summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-06-21 01:33:57 +0100
committerPascal Terjan <pterjan@gmail.com>2016-06-21 01:33:57 +0100
commitfb2e997c9212f00ae977259465a06e9cc5947abb (patch)
tree49826522c5b493eb3e281eb348ce849b88f04cd2 /index.php
parent3e1ae893bb747ce1881c240fc30c278eff607d59 (diff)
downloadpkgsubmit-fb2e997c9212f00ae977259465a06e9cc5947abb.tar
pkgsubmit-fb2e997c9212f00ae977259465a06e9cc5947abb.tar.gz
pkgsubmit-fb2e997c9212f00ae977259465a06e9cc5947abb.tar.bz2
pkgsubmit-fb2e997c9212f00ae977259465a06e9cc5947abb.tar.xz
pkgsubmit-fb2e997c9212f00ae977259465a06e9cc5947abb.zip
Avoid crazy durations when start is 0
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/index.php b/index.php
index b7162f9..1bf8329 100644
--- a/index.php
+++ b/index.php
@@ -180,11 +180,13 @@ if ($total > 0) {
$show_time = '';
if ($p['type'] == 'uploaded') {
- $tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead?
- $show_time = '<span class="timeinfo">' . $tdiff . '</span>';
+ if ($p['buildtime']['start'] && $p['buildtime']['end']) {
+ $tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead?
+ $show_time = '<span class="timeinfo">' . $tdiff . '</span>';
- $tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60;
- @$buildtime_stats[timediff(0, $tdiff)] += 1;
+ $tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60;
+ @$buildtime_stats[timediff(0, $tdiff)] += 1;
+ }
}
$s .= ($typelink != '')
? sprintf('<a rel="nofollow" href="%s" class="status-link"><span class="status-box"></span> %s %s</a>',