Display changes on the last build on the page too.

Don't display paginator on single build pages
This commit is contained in:
Latif Khalifa
2013-09-24 01:07:28 +02:00
parent 26f20e7883
commit a7bd414414

View File

@@ -198,7 +198,7 @@ if (isset($_GET["build_id"])) {
chan_selector($chan);
}
if ($res = $DB->query(kl_str_sql("select * from builds where chan=!s $where order by nr desc limit !i offset !i", $chan, $pageSize, $page * $pageSize))) {
if ($res = $DB->query(kl_str_sql("select * from builds where chan=!s $where order by nr desc limit !i offset !i", $chan, $pageSize + 1, $page * $pageSize))) {
while ($row = $DB->fetchRow($res)) {
$build = new stdClass;
@@ -241,6 +241,8 @@ $paginator .= "  Page " . ($page + 1) . " of " . ceil($total / $pageSi
$paginator .= '<a href="' . $nextLink . '">Next&gt;</a>';
if ($pageSize == 1) $paginator = "";
print $paginator;
if ($nrBuilds) {