$email, "email" => ""); if (preg_match("|([^\<]*)<([^>]*)>|", $email, $m)) { $ret["name"] = trim($m[1]); $ret["email"] = trim($m[2]); } return $ret; } function print_changes($current, $next) { global $DB; if ($res = $DB->query(kl_str_sql("select * from revs where id<=!i and id>!i", $current->nr, $next->nr))) { print ''; while ($row = $DB->fetchRow($res)) { $author = parse_email($row["author"]); $gid = md5($author["email"]); print ' '; # pre_dump($row); } print '

' . htmlspecialchars($author["name"]) . '
' . htmlspecialchars($row["hash"]) . ' ' . htmlspecialchars($row["time"]). ' (' . Layout::since(strtotime($row["time"])) . ' ago)
' . htmlspecialchars($row["message"]) . '
'; } } Function print_build($current, $next) { print " Build " . htmlspecialchars($current->nr). " " . htmlspecialchars($current->modified). " (" . Layout::since(strtotime($current->modified)) . " ago) " . htmlspecialchars($current->chan). " Windows Installer    Build Log "; if ($next) { print ''; print_changes($current, $next); print ""; } } Layout::header(); $chan = "SingularityAlpha"; $pageSize = 20; $builds = array(); if ($res = $DB->query(kl_str_sql("select * from builds where chan=!s order by nr desc limit !i", $chan, $pageSize + 1))) { while ($row = $DB->fetchRow($res)) { $build = new stdClass; $DB->loadFromDbRow($build, $res, $row); $builds[] = $build; } } $nrBuilds = count($builds); if ($nrBuilds) { print ''; for ($i = 0; $i < $pageSize; $i++) { if (!isset($builds[$i])) continue; print_build($builds[$i], $builds[$i + 1]); } print '
'; } Layout::footer(); /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */