diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:31 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-09 22:01:31 +0000 |
commit | 58a32d650b288a34013db1d6020d356e3aac22d6 (patch) | |
tree | 51e44ec1045182fd318293e27e0f68d470941f36 /log_files.php | |
parent | 57687bab5f8e7369eb7fbe03dfa3e28136978038 (diff) | |
download | pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.gz pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.bz2 pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.tar.xz pkgsubmit-58a32d650b288a34013db1d6020d356e3aac22d6.zip |
show build dir name + .youri and .done log files
Diffstat (limited to 'log_files.php')
-rw-r--r-- | log_files.php | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/log_files.php b/log_files.php index bdc6525..a2203d3 100644 --- a/log_files.php +++ b/log_files.php @@ -25,6 +25,8 @@ require 'conf.php'; // FIXME this expects to remove /uploads from $key. Could be different in the future. $key = substr($key, 8); $path = realpath($upload_dir . $key); +$job = explode('/', $key); +$job = end($job); if (!is_dir($path)) { header('Status: 404 Not Found'); @@ -33,7 +35,8 @@ if (!is_dir($path)) { } $glob = $path . '/*'; -$s = '<ul>'; +$s = sprintf('<h4>%s</h4>', $job); +$s .= '<ul>'; foreach (glob_recursive($glob) as $f) { if (is_dir($f)) @@ -41,11 +44,30 @@ foreach (glob_recursive($glob) as $f) { $link = 'uploads' . str_replace($upload_dir, '', $f); $show = str_replace(array($path . '/', '/'), array('', ' / '), $f); - $s .= sprintf('<li><a href="%s">%s</a> (%s)</li>', + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', $link, $show, _format_bytes(filesize($f)) ); } + +$others = array( + '.youri', + '_i586.done', + '_x86_64.done' +); +foreach ($others as $suffix) { + $f = $path . $suffix; + if (file_exists($f)) { + $link = 'uploads' . str_replace($upload_dir, '', $f); + $show = explode($path, $f); + $show = $job . $suffix; + $s .= sprintf('<li><a href="%s" rel="nofollow">%s</a> (%s)</li>', + $link, $show, + _format_bytes(filesize($f)) + ); + } +} + $s .= '</ul>'; echo $s; |