--- spam.module.orig Fri Mar 28 10:38:01 2008 +++ spam.module Fri Mar 28 10:39:16 2008 @@ -487,8 +487,6 @@ * Drupal _cron hook. Provides ability to automatically expired spam content. */ function spam_cron() { - global $base_url; - // send email notifications every 24 hours $email_timer = variable_get('spam_email_timer', 0); if ($email_timer < (time() - 86400)) { @@ -500,7 +498,7 @@ $urls = array(); while ($reported = db_fetch_object($result)) { $message .= t(" - @num @source\n", array('@num' => $reported->count, '@source' => format_plural($reported->count, $reported->source, $reported->source .'s'))); - $urls[] = $base_url . url("admin/content/$reported->source/list/reported"); + $urls[] = url("admin/content/$reported->source/list/reported", null, null, true); } $message .= t("\n Please review this reported spam by visiting the following @url:\n", array('@url' => format_plural(sizeof($urls), 'url', 'urls'))); foreach ($urls as $url) { @@ -2234,12 +2232,11 @@ * Generate an appropriate notification mail message */ function spam_mail_body($type, $header, $body, $id) { - global $base_url; switch ($type) { case 'comment': - return t("Hello @adminname.\n\n A @type recently posted to your '@sitename' website has been automatically marked as spam. The text of the spam @type is as follows:\n\n\nSubject: @title\n\n@body\n\n Edit the @type here: @editurl\n View all spam @types here: @allurl", array('@adminname' => $admin->name, '@types' => $type .'s', '@type' => $type, '@sitename' => variable_get('site_name', 'drupal'), '@title' => $header, '@body' => $body, '@editurl' => $base_url .url("$type/edit/$id"), '@allurl' => $base_url .url("admin/content/$type/list/spam"))); + return t("Hello @adminname.\n\n A @type recently posted to your '@sitename' website has been automatically marked as spam. The text of the spam @type is as follows:\n\n\nSubject: @title\n\n@body\n\n Edit the @type here: @editurl\n View all spam @types here: @allurl", array('@adminname' => $admin->name, '@types' => $type .'s', '@type' => $type, '@sitename' => variable_get('site_name', 'drupal'), '@title' => $header, '@body' => $body, '@editurl' => url("$type/edit/$id", null, null, true), '@allurl' => url("admin/content/$type/list/spam", null, null, true))); case 'node': - return t("Hello @adminname.\n\n A @type recently posted to your '@sitename' website has been automatically marked as spam. The text of the spam @type is as follows:\n\n\nSubject: @title\n\n@body\n\n Edit the @type here: @editurl\n View all spam @types here: @allurl", array('@adminname' => $admin->name, '@types' => $type .'s', '@type' => $type, '@sitename' => variable_get('site_name', 'drupal'), '@title' => $header, '@body' => $body, '@editurl' => $base_url .url("$type/$id/edit"), '@allurl' => $base_url .url("admin/content/$type/list/spam"))); + return t("Hello @adminname.\n\n A @type recently posted to your '@sitename' website has been automatically marked as spam. The text of the spam @type is as follows:\n\n\nSubject: @title\n\n@body\n\n Edit the @type here: @editurl\n View all spam @types here: @allurl", array('@adminname' => $admin->name, '@types' => $type .'s', '@type' => $type, '@sitename' => variable_get('site_name', 'drupal'), '@title' => $header, '@body' => $body, '@editurl' => url("$type/$id/edit", null, null, true), '@allurl' => url("admin/content/$type/list/spam", null, null, true))); default: return t("Hello @adminname.\n\n @type content recently posted to your '@sitename' website has been automatically marked as spam. The text of the spam content is as follows:\n\n\nSubject: @title\n\n@body\n", array('@adminname' => $admin->name, '@type' => $type, '@sitename' => variable_get('site_name', 'drupal'), '@title' => $header, '@body' => $body)); }