From d4dff48c29dd57834d91cdfc3c7fac4e0376e8a0 Mon Sep 17 00:00:00 2001 From: Latif Khalifa Date: Mon, 27 May 2013 20:56:21 +0200 Subject: [PATCH] Link to Github diff --- index.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 3f9a4e3..12d4461 100644 --- a/index.php +++ b/index.php @@ -84,6 +84,8 @@ Function print_build($current, $next, $buildNr, $chan) $vspace = ""; + $github = "https://github.com/singularity-viewer/SingularityViewer/"; + if ($next) { if (($current->linux_file && $current->osx_file && $current->linux64_file)) { $vspace = "

"; @@ -98,7 +100,14 @@ Function print_build($current, $next, $buildNr, $chan) } print "" . htmlspecialchars($current->modified). " (" . Layout::since(strtotime($current->modified)) . " ago)
"; - print $vspace . ''; + + if ($next) { + $gh_link = $github . "compare/" . substr($next->hash, 0, 12) . "..." . substr($current->hash, 0, 12); + } else { + $gh_link = $github . "commits/" . $current->hash; + } + + print $vspace . ''; print substr($current->hash, 0, 10) . ""; Print "