diff -upr spam.OLD-OK/filters/bayesian/bayesian.info spam.NEW/filters/bayesian/bayesian.info
--- spam.OLD-OK/filters/bayesian/bayesian.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/bayesian/bayesian.info	2009-06-17 02:24:24.000000000 +0200
@@ -4,9 +4,9 @@ description = A bayesian filter.
 package = Spam
 dependencies[] = spam
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/filters/custom/custom.info spam.NEW/filters/custom/custom.info
--- spam.OLD-OK/filters/custom/custom.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/custom/custom.info	2009-06-17 02:24:24.000000000 +0200
@@ -4,9 +4,9 @@ description = Allows the creation of cus
 package = Spam
 dependencies[] = spam
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/filters/custom/custom.module spam.NEW/filters/custom/custom.module
--- spam.OLD-OK/filters/custom/custom.module	2009-02-18 14:02:59.000000000 +0100
+++ spam.NEW/filters/custom/custom.module	2008-12-25 06:42:10.000000000 +0100
@@ -67,7 +67,6 @@ function custom_menu() {
     'title' => 'Custom',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('custom_admin_settings'),
-    'access arguments' => array('administer spam'),
     'description' => 'Configure the custom spam filter module.',
     'type' => MENU_LOCAL_TASK,
   );
@@ -76,25 +75,20 @@ function custom_menu() {
     'title' => 'List',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('custom_admin_settings'),
-    'access arguments' => array('administer spam'),
     'description' => 'Configure the custom spam filter module.',
     'type' => MENU_DEFAULT_LOCAL_TASK,
   );
-
   $items['admin/settings/spam/filters/custom/create'] = array(
     'title' => 'Create',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('custom_admin_filter'),
-    'access arguments' => array('administer spam'),
     'description' => 'Create a custom spam filter.',
     'type' => MENU_LOCAL_TASK,
   );
-
   $items["admin/settings/spam/filters/custom/%/edit"] = array(
     'title' => 'Create',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('custom_admin_filter', 5),
-    'access arguments' => array('administer spam'),
     'description' => 'Edit a custom spam filter.',
     'type' => MENU_LOCAL_TASK,
   );
@@ -234,6 +228,7 @@ function custom_theme() {
  * Format the custom filter admin page.
  */
 function theme_custom_admin_settings($form) {
+  _custom_upgrade();
   $header = array(theme('table_select_header_cell'), t('Filter'), t('Style'), t('Scan'), t('Status'), t('Matches'), t('Last'), '');
 
   $output = drupal_render($form['options']);
@@ -289,12 +284,12 @@ function custom_spam_custom_operations()
 /**
  * Create or edit a custom spam filter.
  */
-function custom_admin_filter(&$form_state, $cid = NULL) {
+function custom_admin_filter($cid = NULL) {
   if ($cid) {
     drupal_set_title('Edit');
     $custom = db_fetch_object(db_query('SELECT * FROM {spam_custom} WHERE cid = %d', $cid));
     if (!isset($custom->cid)) {
-      drupal_set_message(t('Failed to load custom filter.'), 'error');
+      drupal_set_message(t('Failed to load custom filter.'));
       drupal_goto('admin/settings/spam/filters/custom');
     }
   }
@@ -448,19 +443,19 @@ function custom_admin_settings_submit($f
  * Perform custom operations.
  * TODO: Confirmation would be nice.
  */
-function custom_spam_filter_operations($op, $cid) {
+function custom_spam_filter_operations(&$form_state, $op, $cid) {
   $filter = db_fetch_object(db_query('SELECT cid, status, filter FROM {spam_custom} WHERE cid = %d', $cid));
   switch ($op) {
     case 'delete':
       if ($filter->cid) {
         db_query('DELETE FROM {spam_custom} WHERE cid = %d', $cid);
-        drupal_set_message(t('Custom filter %filter deleted.', array('%filter' => $filter->filter)));
+        drupal_set_message(t('Deleted custom filter %filter.', array('%filter' => $filter->filter)));
       }
       break;
     case 'disable':
       if ($filter->cid && $filter->status != SPAM_CUSTOM_STATUS_DISABLED) {
         db_query('UPDATE {spam_custom} SET status = %d WHERE cid = %d', SPAM_CUSTOM_STATUS_DISABLED, $cid);
-        drupal_set_message(t('Custom filter %filter disabled.', array('%filter' => $filter->filter)));
+        drupal_set_message(t('Disabled custom filter %filter.', array('%filter' => $filter->filter)));
       }
       break;
   }
diff -upr spam.OLD-OK/filters/duplicate/duplicate.info spam.NEW/filters/duplicate/duplicate.info
--- spam.OLD-OK/filters/duplicate/duplicate.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/duplicate/duplicate.info	2009-06-17 02:24:24.000000000 +0200
@@ -4,9 +4,9 @@ description = A duplication detecting sp
 package = Spam
 dependencies[] = spam
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/filters/duplicate/duplicate.module spam.NEW/filters/duplicate/duplicate.module
--- spam.OLD-OK/filters/duplicate/duplicate.module	2009-02-18 14:03:16.000000000 +0100
+++ spam.NEW/filters/duplicate/duplicate.module	2008-12-25 06:42:10.000000000 +0100
@@ -30,21 +30,18 @@ function duplicate_menu() {
     'title' => 'Duplicate',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('duplicate_admin_settings'),
-    'access arguments' => array('administer spam'),
     'description' => 'Configure the spam duplicate filter.',
     'type' => MENU_LOCAL_TASK,
   );
-
   $items['duplicate/denied/ip'] = array(
     'page callback' => 'duplicate_denied_ip',
     'type' => MENU_CALLBACK,
-    'access callback' => TRUE,
+    'access arguments' => array(TRUE),
   );
-
   $items['duplicate/denied/post'] = array(
     'page callback' => 'duplicate_denied_post',
     'type' => MENU_CALLBACK,
-    'access callback' => TRUE,
+    'access arguments' => array(TRUE),
   );
 
   $items['admin/reports/spam/blocked_ip'] = array(
diff -upr spam.OLD-OK/filters/node_age/node_age.info spam.NEW/filters/node_age/node_age.info
--- spam.OLD-OK/filters/node_age/node_age.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/node_age/node_age.info	2009-06-17 02:24:24.000000000 +0200
@@ -5,9 +5,9 @@ package = Spam
 dependencies[] = spam
 dependencies[] = comment
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/filters/node_age/node_age.module spam.NEW/filters/node_age/node_age.module
--- spam.OLD-OK/filters/node_age/node_age.module	2009-02-18 14:04:03.000000000 +0100
+++ spam.NEW/filters/node_age/node_age.module	2008-12-25 06:42:10.000000000 +0100
@@ -19,7 +19,6 @@ function node_age_menu() {
     'title' => 'Node age',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('node_age_admin_settings'),
-    'access arguments' => array('administer spam'),
     'description' => 'Configure the node age filter.',
     'type' => MENU_LOCAL_TASK,
   );
diff -upr spam.OLD-OK/filters/surbl/surbl.info spam.NEW/filters/surbl/surbl.info
--- spam.OLD-OK/filters/surbl/surbl.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/surbl/surbl.info	2009-06-17 02:24:24.000000000 +0200
@@ -4,9 +4,9 @@ description = A Surbl filter plug-in for
 package = Spam
 dependencies[] = spam
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/filters/url/url.info spam.NEW/filters/url/url.info
--- spam.OLD-OK/filters/url/url.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/filters/url/url.info	2009-06-17 02:24:24.000000000 +0200
@@ -5,9 +5,9 @@ package = Spam
 dependencies[] = spam
 dependencies[] = bayesian
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/modules/spam_comment.inc spam.NEW/modules/spam_comment.inc
--- spam.OLD-OK/modules/spam_comment.inc	2009-02-18 14:07:49.000000000 +0100
+++ spam.NEW/modules/spam_comment.inc	2009-06-16 19:18:53.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: spam_comment.inc,v 1.1.2.1.2.11.2.2 2009/02/13 16:36:05 jeremy Exp $
+// $Id: spam_comment.inc,v 1.1.2.1.2.11.2.3 2009/06/16 17:18:53 gnassar Exp $
 
 /**
  * @file
@@ -179,10 +179,8 @@ function comment_spamapi($op, $arg1 = NU
       $items = array();
       $items['admin/content/comment/list/spam'] = array(
         'title' => t('Spam'),
-        'page callback' => 'spam_comment_admin',
-        'access arguments' => array('administer spam'),
-        'file' => 'comment.admin.inc',
-        'file path' => drupal_get_path('module', 'comment'),
+        'page callback' => 'spam_comment_admin',
+        'access arguments' => array('administer spam'),
         'type' => MENU_LOCAL_TASK,
       );
       return $items;
@@ -332,16 +330,15 @@ function spam_comment_admin_overview(&$f
     array('data' => t('Time'), 'field' => 'timestamp', 'sort' => 'desc'),
     array('data' => t('Operations'))
   ));
-  $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title as node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d'. tablesort_sql($form['header']['#value']), 50, 0, NULL, SPAM_COMMENT);
+  $result = pager_query('SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid, n.title AS node_title FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid INNER JOIN {node} n ON n.nid = c.nid WHERE c.status = %d'. tablesort_sql($form['header']['#value']), 50, 0, NULL, SPAM_COMMENT);
 
   // build a table listing the appropriate comments
   $destination = drupal_get_destination();
   while ($comment = db_fetch_object($result)) {
     $comments[$comment->cid] = '';
     $comment->name = $comment->uid ? $comment->registered_name : $comment->name;
-    $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-'. $comment->cid)));
+    $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('attributes' => array('title' => truncate_utf8($comment->comment, 128)), 'fragment' => 'comment-'. $comment->cid)));
     $form['username'][$comment->cid] = array('#value' => theme('username', $comment));
-    $form['node_title'][$comment->cid] = array('#value' => l($comment->node_title, 'node/'. $comment->nid));
     $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
     $form['operations'][$comment->cid] = array('#value' => l(t('edit'), 'comment/edit/'. $comment->cid, array('query' => $destination)));
   }
@@ -372,7 +369,7 @@ function spam_comment_admin_overview_sub
 /**
  * Re-use function from comment module.
  */
-function theme_spam_comment_admin_overview($form) {
-  return theme('comment_admin_overview', $form);
+function theme_spam_comment_admin_overview($form) {
+  return theme('comment_admin_overview', $form);
 }
 
diff -upr spam.OLD-OK/modules/spam_node.inc spam.NEW/modules/spam_node.inc
--- spam.OLD-OK/modules/spam_node.inc	2009-02-18 14:09:13.000000000 +0100
+++ spam.NEW/modules/spam_node.inc	2008-12-25 06:42:11.000000000 +0100
@@ -167,14 +167,13 @@ function node_spamapi($op, $arg1 = NULL,
 
     case 'publish':
       if (is_numeric($arg1)) {
-        // Mark node as published.
-        db_query("UPDATE {node} SET status = 1 WHERE nid = %d", $arg1);
+        node_operations_publish(array($arg1));
       }
       break;
 
     case 'unpublish':
       if (is_numeric($arg1)) {
-        db_query("UPDATE {node} SET status = 0 WHERE nid = %d", $arg1);
+        node_operations_unpublish(array($arg1));
       }
       break;
 
diff -upr spam.OLD-OK/modules/spam_user.inc spam.NEW/modules/spam_user.inc
--- spam.OLD-OK/modules/spam_user.inc	2009-02-18 14:10:22.000000000 +0100
+++ spam.NEW/modules/spam_user.inc	2008-12-25 06:42:11.000000000 +0100
@@ -223,8 +223,13 @@ function user_spamapi($op, $arg1 = NULL,
  * Be sure we're scanning the latest profile data.
  */
 function spam_user_profile_update($user) {
-  if (module_exists('profile')) {
-    profile_load_profile($user);
+  $profile = array();
+
+  $result = db_query('SELECT fid, value FROM {profile_values} WHERE uid = %d', $user->uid);
+  while ($value = db_fetch_object($result)) {
+    $name = db_result(db_query('SELECT name FROM {profile_fields} WHERE fid = %d', $value->fid));
+    $user->$name = $value->value;
   }
   return $user;
 }
+
diff -upr spam.OLD-OK/spam.info spam.NEW/spam.info
--- spam.OLD-OK/spam.info	2009-02-14 01:16:45.000000000 +0100
+++ spam.NEW/spam.info	2009-06-17 02:24:24.000000000 +0200
@@ -3,9 +3,9 @@ name = Spam API
 description = The core Spam API for autodetecting and managing spam.
 package = Spam
 core = 6.x
-; Information added by drupal.org packaging script on 2009-02-14
+; Information added by drupal.org packaging script on 2009-06-17
 version = "6.x-1.x-dev"
 core = "6.x"
 project = "spam"
-datestamp = "1234570605"
+datestamp = "1245198264"
 
diff -upr spam.OLD-OK/spam.module spam.NEW/spam.module
--- spam.OLD-OK/spam.module	2009-02-18 13:54:44.000000000 +0100
+++ spam.NEW/spam.module	2009-06-16 19:19:10.000000000 +0200
@@ -1,5 +1,5 @@
 <?php
-// $Id: spam.module,v 1.51.4.1.2.41.2.30.2.3 2009/02/13 16:36:05 jeremy Exp $
+// $Id: spam.module,v 1.51.4.1.2.41.2.30.2.4 2009/06/16 17:19:10 gnassar Exp $
 
 /**
  * @file
@@ -497,7 +497,6 @@ 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',
@@ -505,7 +504,6 @@ 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',
@@ -513,7 +511,6 @@ 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',
@@ -521,7 +518,6 @@ 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'),
@@ -608,12 +604,6 @@ function spam_theme() {
         'form' => NULL,
       ),
     ),
-    'spam_comment_admin_overview' => array(
-      'file' => 'modules/spam_comment.inc',
-      'arguments' => array(
-        'form' => NULL,
-      ),
-    ),
   );
 }
 
@@ -874,10 +864,7 @@ 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')))
   );
 
-  $form = system_settings_form($form);
-  // Unset the #submit function because we will use our own function.
-  unset($form['#submit']);
-  return $form;
+  return system_settings_form($form);
 }
 
 /**
@@ -908,8 +895,7 @@ function spam_admin_settings_form_submit
       }
     }
   }
-  $filter_types = is_array($filter_types) ? implode(',', $filter_types) : $filter_types;
-  variable_set('filter_types', $filter_types);
+  variable_set('filter_types', implode(',', $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
@@ -1078,7 +1064,7 @@ function spam_admin_list_feedback() {
 /**
  * Spam feedback details.
  */
-function spam_admin_feedback_form($form_state, $bid) {
+function spam_admin_feedback_form($bid) {
   $form = array();
 
   $feedback = db_fetch_object(db_query('SELECT * FROM {spam_filters_errors} WHERE bid = %d', $bid));
@@ -1478,7 +1464,7 @@ function theme_spam_admin_overview($form
  */
 function spam_spam_operations() {
   $operations = array(
-    'not_spam' => array(
+    'notspam' => array(
       'label' => t('Mark as not spam'),
       'callback' => 'spam_operations_callback',
       'callback arguments' => array('mark_as_not_spam'),
@@ -1500,7 +1486,7 @@ function spam_spam_operations() {
 /**
  * Callback function for admin mass editing spam.  Mark as spam.
  */
-function spam_operations_callback($spam, $op) {
+function spam_operations_callback(&$form_state, $spam, $op) {
   foreach ($spam as $content) {
     $pieces = explode('-', $content);
     if (drupal_strlen($pieces[0]) && is_numeric($pieces[1]) && drupal_strlen($op)) {
@@ -1683,9 +1669,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']);
   }
@@ -1987,11 +1973,11 @@ function spam_logs_entry($id = NULL) {
     return NULL;
   }
 
-  $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');
+  $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'));
   drupal_set_breadcrumb($breadcrumb);
 
   $message = db_fetch_object(db_query('SELECT * FROM {spam_log} WHERE lid = %d', $id));
@@ -2022,11 +2008,11 @@ function spam_logs_trace($trid = NULL) {
 
   drupal_set_title(t('Spam module logs 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');
+  $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'));
   drupal_set_breadcrumb($breadcrumb);
 
   $header = array(
