$email, "email" => ""); if (preg_match("|([^\<]*)<([^>]*)>|", $email, $m)) { $ret["name"] = trim($m[1]); $ret["email"] = trim($m[2]); } return $ret; } function print_changeset($row) { $author = parse_email($row["author"]); $gid = md5(strtolower($author["email"])); $avatar = (USE_SSL ? "https://secure.gravatar.com" : "http://www.gravatar.com") . "/avatar/$gid?r=x&d=mm&s=48"; print ' Avatar
' . htmlspecialchars($author["name"]) . ' ' . htmlspecialchars($row["hash"]) . ' ' . htmlspecialchars($row["time"]). ' (' . Layout::since(strtotime($row["time"])) . ' ago)
' . htmlspecialchars($row["message"]) . '
'; } function sort_by_date($a, $b) { if ($a["time"] < $b["time"]) { return 1; } else if ($a["time"] > $b["time"]) { return -1; } return 0; } function print_changes($current, $next, $chan) { global $DB; $revs = array(); if (!($res = $DB->query(kl_str_sql("select revisions from changes where chan=!s and build<=!i and build>!i order by build desc", $chan, $current->nr, $next->nr)))) { return; } else { while ($row = $DB->fetchRow($res)) { $revs = array_merge($revs, explode(",", $row["revisions"])); } } if ($res = $DB->query(kl_str_sql("select * from revs where chan=!s and hash in ('" . implode("','", $revs) . "')", $chan))) { $changesets = array(); while ($row = $DB->fetchRow($res)) { $changesets[] = $row; } if (count($changesets) == 0) return; print ''; usort($changesets, "sort_by_date"); foreach ($changesets as $change) { print_changeset($change); } print '
'; } } Function print_build($current, $next, $buildNr, $chan) { print " nr}\">Build " . htmlspecialchars($current->nr). "
"; if ($next) { if (($current->linux_file && $current->osx_file && $current->linux64_file)) { print "

"; } elseif (($current->linux_file && $current->osx_file)) { print "
"; } print ' ' . ($buildNr ? 'Hide changes <<' : 'Show changes >>') . ''; } print "" . htmlspecialchars($current->modified). " (" . Layout::since(strtotime($current->modified)) . " ago) " . htmlspecialchars($current->chan). " \"Download Windows             Build Log"; if ($current->linux_file) { print "
\"Download Linux (32 bit)"; if (file_exists($current->linux_file . ".log")) { print "      Build Log"; } } if ($current->linux64_file) { print "
\"Download Linux (64 bit)"; if (file_exists($current->linux64_file . ".log")) { print "      Build Log"; } } if ($current->osx_file) { print "
\"Download Mac OS X"; if (file_exists($current->osx_file . ".log")) { print "            Build Log"; } } print ""; if ($next) { print '