--- spam/spam.module.OLD	2009-02-13 17:36:05.000000000 +0100
+++ spam/spam.module		2009-02-18 13:54:44.000000000 +0100
@@ -497,6 +497,7 @@ function spam_menu() {
     'page callback' => 'spam_denied_page',
     'type' => MENU_CALLBACK,
     'access arguments' => array(TRUE),
+    'access callback' => TRUE,
   );
   $items['spam/denied/error/%spam_hash/%'] = array(
     'title' => 'Report legitimate content',
@@ -504,6 +505,7 @@ function spam_menu() {
     'page callback' => 'spam_denied_in_error_page',
     'type' => MENU_CALLBACK,
     'access arguments' => array(TRUE),
+    'access callback' => TRUE,
   );
   $items['spam/%spam_mark/%/spam'] = array(
     'page callback' => 'spam_mark_as_spam',
@@ -511,6 +513,7 @@ function spam_menu() {
     'load arguments' => array(2, 3),
     'type' => MENU_CALLBACK,
     'access arguments' => array(TRUE),
+    'access callback' => TRUE,
   );
   $items['spam/%spam_mark/%/not_spam'] = array(
     'page callback' => 'spam_mark_as_not_spam',
@@ -518,6 +521,7 @@ function spam_menu() {
     'load arguments' => array(2, 3),
     'type' => MENU_CALLBACK,
     'access arguments' => array(TRUE),
+    'access callback' => TRUE,
   );
   $items["admin/reports/spam/%spam_number/detail"] = array(
     'access arguments' => array('administer spam'),
@@ -604,6 +608,12 @@ function spam_theme() {
         'form' => NULL,
       ),
     ),
+    'spam_comment_admin_overview' => array(
+      'file' => 'modules/spam_comment.inc',
+      'arguments' => array(
+        'form' => NULL,
+      ),
+    ),
   );
 }
 
@@ -864,7 +874,10 @@ function spam_admin_settings_form() {
     '#description' => t('Older spam log entries will be automatically discarded. (Requires a correctly configured <a href="@cron">cron maintenance task</a>.)', array('@cron' => url('admin/reports/status')))
   );
 
-  return system_settings_form($form);
+  $form = system_settings_form($form);
+  // Unset the #submit function because we will use our own function.
+  unset($form['#submit']);
+  return $form;
 }
 
 /**
@@ -895,7 +908,8 @@ function spam_admin_settings_form_submit
       }
     }
   }
-  variable_set('filter_types', implode(',', $filter_types));
+  $filter_types = is_array($filter_types) ? implode(',', $filter_types) : $filter_types;
+  variable_set('filter_types', $filter_types);
 /* TODO The 'op' element in the form values is deprecated.
    Each button can have #validate and #submit functions associated with it.
    Thus, there should be one button that submits the form and which invokes
@@ -1064,7 +1078,7 @@ function spam_admin_list_feedback() {
 /**
  * Spam feedback details.
  */
-function spam_admin_feedback_form($bid) {
+function spam_admin_feedback_form($form_state, $bid) {
   $form = array();
 
   $feedback = db_fetch_object(db_query('SELECT * FROM {spam_filters_errors} WHERE bid = %d', $bid));
@@ -1464,7 +1478,7 @@ function theme_spam_admin_overview($form
  */
 function spam_spam_operations() {
   $operations = array(
-    'notspam' => array(
+    'not_spam' => array(
       'label' => t('Mark as not spam'),
       'callback' => 'spam_operations_callback',
       'callback arguments' => array('mark_as_not_spam'),
@@ -1486,7 +1500,7 @@ function spam_spam_operations() {
 /**
  * Callback function for admin mass editing spam.  Mark as spam.
  */
-function spam_operations_callback(&$form_state, $spam, $op) {
+function spam_operations_callback($spam, $op) {
   foreach ($spam as $content) {
     $pieces = explode('-', $content);
     if (drupal_strlen($pieces[0]) && is_numeric($pieces[1]) && drupal_strlen($op)) {
@@ -1669,9 +1683,9 @@ function spam_error_page() {
 function spam_error_page_submit($form, &$form_state) {
   global $user;
   $content = unserialize($_SESSION['content']);
+  $type = $_SESSION['type'];
   $id = spam_invoke_module($type, 'content_id', $content);
   $hash = md5($_SESSION['content']);
-  $type = $_SESSION['type'];
   if (is_array($_SESSION['spam_form'])) {
     $spam_form = serialize($_SESSION['spam_form']);
   }
@@ -1695,7 +1709,7 @@ function spam_links($type, $id, $content
 
       if ($score >= variable_get('spam_threshold', SPAM_DEFAULT_THRESHOLD)) {
         $links['spam'] = array('title' => t('spam (@score)', array('@score' => $score)));
-        $links['mark-as-not-spam'] = array('href' => "spam/$type/$id/notspam", 'title' => t('mark as not spam'));
+        $links['mark-as-not-spam'] = array('href' => "spam/$type/$id/not_spam", 'title' => t('mark as not spam'));
       }
       else {
         $links['spam'] = array('title' => t('not spam (@score)', array('@score' => $score)));
@@ -1973,11 +1987,11 @@ function spam_logs_entry($id = NULL) {
     return NULL;
   }
 
-  $breadcrumb[] = array('path' => '', 'title' => t('Home'));
-  $breadcrumb[] = array('path' => 'admin', 'title' => t('Administer'));
-  $breadcrumb[] = array('path' => 'admin/reports', 'title' => t('Logs'));
-  $breadcrumb[] = array('path' => 'admin/reports/spam', 'title' => t('Spam'));
-  $breadcrumb[] = array('path' => 'admin/reports/spam/detail', 'title' => t('Spam module log entry'));
+  $breadcrumb[] = l(t('Home'), NULL);
+  $breadcrumb[] = l(t('Administer'), 'admin');
+  $breadcrumb[] = l(t('Logs'), 'admin/reports');
+  $breadcrumb[] = l(t('Spam'), 'admin/reports/spam');
+  $breadcrumb[] = l(t('Spam module log entry'), 'admin/reports/spam/detail');
   drupal_set_breadcrumb($breadcrumb);
 
   $message = db_fetch_object(db_query('SELECT * FROM {spam_log} WHERE lid = %d', $id));
@@ -2008,11 +2022,11 @@ function spam_logs_trace($trid = NULL) {
 
   drupal_set_title(t('Spam module logs trace'));
 
-  $breadcrumb[] = array('path' => '', 'title' => t('Home'));
-  $breadcrumb[] = array('path' => 'admin', 'title' => t('Administer'));
-  $breadcrumb[] = array('path' => 'admin/reports', 'title' => t('Logs'));
-  $breadcrumb[] = array('path' => 'admin/reports/spam', 'title' => t('Spam'));
-  $breadcrumb[] = array('path' => 'admin/reports/spam/trace', 'title' => t('Spam module log trace'));
+  $breadcrumb[] = l(t('Home'), NULL);
+  $breadcrumb[] = l(t('Administer'), 'admin');
+  $breadcrumb[] = l(t('Logs'), 'admin/reports');
+  $breadcrumb[] = l(t('Spam'), 'admin/reports/spam');
+  $breadcrumb[] = l(t('Spam module log trace'), 'admin/reports/spam/trace');
   drupal_set_breadcrumb($breadcrumb);
 
   $header = array(
