drupal/modules/cvs.module

36 lines
1.3 KiB
Plaintext
Raw Normal View History

<?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() {
Welp. Large commit ahead. CHANGES: - Added "read" and "write" permissions into drupal but removed it again because - when finished after 3 hours of work - it was considered nothing but added complexity that didn't buy us anything. :I (I'll explain this in detail on the mailing list, I guess.) - Added a very simple help.module to group all available documentation on a single page. - Fixed bug in node_control(), book.module: UnConeD forgot to global $user when updating the combobox code. - Removed static wishlist.module: in future, the wishlist can be maintained as a page in our collaborative book. - Revised most of settings.module: tidied up the code and the descriptions to accompany the settings and introduced a new "default maximum number of nodes to display on the main page" variable. - Revised most of comment.module: the administration interface looks better now, integrated node permissions, and -finally- made it possible to delete comments. - Polished on: + account.module + structure.module + locale.module + module.module + forum.module - Form-ified: + account.php + account.module + setting.module + cvs.module + submit.php + comment.module + forum.module + book.module + page.module + locale.module - Updated CHANGELOG INFO: - Designed a "generic tracker system with optional backends" on paper. The idea is to allow registered users to hot-list certain topics, individual nodes or threads (comments) and to "plug-in" output backends like - for instance - an e-mail digest. The design requires "intelligent blocks" though. TODO: - I want to tidy up the headline.module and backend.class as well as merge in headlineRSS10.module. Julian spent quite some time working on headline.module but I'm not sure what he changed and whether he'd contribute it back?
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."));
}
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 />";
$output .= "\n". htmlentities($cvs->message) ."<hr />";
}
$theme->header();
$theme->box("CVS commit messages", "<pre>$output</pre>");
$theme->footer();
}
?>