From 933fd5e7fdcedf8309f57b35731cd66c15734d5b Mon Sep 17 00:00:00 2001 From: Kjartan Mannes <kjartan@2.no-reply.drupal.org> Date: Fri, 12 Apr 2002 19:17:12 +0000 Subject: [PATCH] - removing robots.txt and cvs.module - commiting patch to cloud.module from Remco. --- modules/cloud.module | 10 ++++--- modules/cvs.module | 62 -------------------------------------------- robots.txt | 2 -- 3 files changed, 7 insertions(+), 67 deletions(-) delete mode 100644 modules/cvs.module delete mode 100644 robots.txt diff --git a/modules/cloud.module b/modules/cloud.module index 16ea99b0abd2..5390b44fbeba 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -47,11 +47,11 @@ function cloud_update($site) { ** Check whether the site is properly configured: */ - if (!ereg("^http://|ftp://", $site[link])) { + if (!ereg("^http://|https://|ftp://", $site[link])) { watchdog("warning", "cloud: invalid or missing URL for '". $site["name"] ."'"); } - if (!ereg("^http://|ftp://", $site[feed])) { + if (!ereg("^http://|https://|ftp://", $site[feed])) { watchdog("warning", "cloud: invalid or missing URL to monitor for '". $site["name"] ."'"); } @@ -135,7 +135,11 @@ function cloud_list($limit = 10) { if ($hour != floor((time() - $site->timestamp) / 3600)) { $hour = floor((time() - $site->timestamp) / 3600); if ($hour < 12) { - $output .= "<br />". strtr(t("Updated %a ago:"), array("%a" => format_plural($hour, "hour", "hours"))); + if ($hour == 0) { + $output .= "<br />". t("Updated < 1 hours ago:"); + } else { + $output .= "<br />". strtr(t("Updated %a ago:"), array("%a" => format_plural($hour, "hour", "hours"))); + } } else if ($list) { $output .= "<br />". strtr(t("Updated more than %a ago:"), array("%a" => format_plural($hour, "hour", "hours"))); diff --git a/modules/cvs.module b/modules/cvs.module deleted file mode 100644 index ca739fe51e7f..000000000000 --- a/modules/cvs.module +++ /dev/null @@ -1,62 +0,0 @@ -<?php -// $Id$ - -function cvs_perm() { - return array("access cvs messages"); -} - -function cvs_link($type) { - if ($type == "page" && user_access("access cvs messages")) { - $links[] = "<a href=\"module.php?mod=cvs\" title=\"". t("Read the recent CVS log messages.") ."\">" . t("cvs messages") . "</a>"; - } - - return $links ? $links : array(); -} - -function cvs_cron() { - if (time() - variable_get("cvs_cron_last", 0) > variable_get("cvs_cron_time", time())) { - variable_set("cvs_cron_last", time()); - - $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_options() { - $period = array(43200 => format_interval(43200), 86400 => format_interval(86400), 172800 => format_interval(172800), 259200 => format_interval(259200), 604800 => format_interval(604800), 1209600 => format_interval(1209600)); - $output .= form_textfield("Digest recepients", "cvs_mail", variable_get("cvs_mail", "root@localhost"), 55, 128, "The e-mail address to mail the CVS log messages to. Multiple recipients can be specified by putting a comma between each address."); - $output .= form_select("Digest interval", "cvs_cron_time" , variable_get("cvs_cron_time", 86400), $period, "The time interval at which batched CVS digests are dispatched. Requires crontab."); - - return $output; -} - -function cvs_page() { - global $theme; - - if (user_access("access cvs messages")) { - $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". nl2br(htmlentities($cvs->message)) ."<hr />"; - } - - $theme->header(); - $theme->box("CVS commit messages", "<div style=\"font-family: monospace;\">$output</div>"); - $theme->footer(); - } - else { - $theme->header(); - $theme->box(t("Access denied"), message_access()); - $theme->footer(); - } -} - -?> \ No newline at end of file diff --git a/robots.txt b/robots.txt deleted file mode 100644 index 1f53798bb4fe..000000000000 --- a/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: / -- GitLab