2001-04-19 18:59:10 +00:00
<?php
function cvs_cron() {
$result = db_query("SELECT * FROM cvs WHERE status = '0' ORDER BY timestamp DESC LIMIT 50");
while ($cvs = db_fetch_object($result)) {
$body .= "File: $cvs->files\nDate: ". format_date($cvs->timestamp) ."\nUser: $cvs->user\n\n$cvs->message\n----------------------------------------------------------------------\n";
}
$result = db_query("UPDATE cvs SET status = '1'");
if ($body) mail(variable_get(cvs_mail, "root@localhost"), "CVS log messages", $body, "From: no-reply");
}
function cvs_conf() {
2001-04-30 17:13:08 +00:00
return form_textfield(t("CVS digest recepient"), "cvs_mail", variable_get(cvs_mail, "root@localhost"), 30, 55, t("The e-mail address to mail the CVS log messages to. Multiple recipients can be specified by putting a comma between each address."));
2001-04-19 18:59:10 +00:00
}
function cvs_page() {
global $theme;
$result = db_query("SELECT * FROM cvs ORDER BY timestamp DESC LIMIT 50");
while ($cvs = db_fetch_object($result)) {
$output .= "<b>File:</b> $cvs->files<br />";
$output .= "<b>Date:</b> ". format_date($cvs->timestamp) ."<br />";
$output .= "<b>User:</b> $cvs->user<br />";
2001-05-14 07:26:08 +00:00
$output .= "\n". nl2br(htmlentities($cvs->message)) ."<hr />";
2001-04-19 18:59:10 +00:00
}
$theme->header();
2001-05-14 07:26:08 +00:00
$theme->box("CVS commit messages", "<div style=\"font-family: monospace;\">$output</div>");
2001-04-19 18:59:10 +00:00
$theme->footer();
}
?>