%s |
%s
%s |
%s
%s/%s |
T;
if ($total > 0) {
foreach ($pkgs as $key => $p) {
if (trim($p['package']) == '') {
continue;
}
$revision_link = sprintf($package_commit_url, $p['revision']);
$s .= sprintf($tmpl,
$p['type'],
$revision_link,
addslashes($p['summary']),
$p['package'],
$p['user'], $p['user'],
timediff(key2timestamp($key)) . ' ago',
$p['version'],
$p['media'], $p['section']
);
$typelink = '';
if ($p['type'] == 'failure') {
$typelink = '/uploads/' . $p['type'] . '/' . $p['path'];
} elseif ($p['type'] == 'rejected') {
$typelink = '/uploads/' . $p['type'] . '/' . $p['path'] . '.youri';
} else {
$typelink = '/uploads/done/' . $p['path'];
if (!is_dir(realpath($upload_dir . '/..' . $typelink))) {
$typelink = '';
}
}
$typestr = $p['type'];
if (isset($p['status']['build'])) {
$typealt = 'Building on';
foreach ($p['status']['build'] as $h) {
$typealt .= " $h";
}
$typestr = "$typestr";
}
$s .= '';
$show_time = '';
if ($p['type'] == 'uploaded') {
$tdiff = timediff($p['buildtime']['start'], $p['buildtime']['end']); // use $p['buildtime']['diff']; instead?
$show_time = '' . $tdiff . '';
$tdiff = floor(($p['buildtime']['end'] - $p['buildtime']['start']) / 60)*60;
@$buildtime_stats[timediff(0, $tdiff)] += 1;
}
$s .= ($typelink != '')
? sprintf(' %s %s',
$typelink, $typestr, $show_time)
: sprintf(' %s %s',
$typestr, $show_time);
if (isset($p['status']['fail'])) {
$failed_arches = array_keys($p['status']['fail']);
if (!empty($failed_arches)) {
sort($failed_arches);
$typelink = '/uploads/failure/' . $p['path'];
$s .= ' ' . join(' ', $failed_arches) . '';
}
}
$s .= ' | ';
}
echo sprintf('%d packages submitted in the past %d hours:
', $total, $max_modified * 24);
// Last submitted packages
echo '',
'
Package |
Who when |
Target media |
Status process time |
',
'', $s, '',
'
';
echo '