Index: mollom.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.admin.inc,v
retrieving revision 1.1.2.38
diff -u -p -r1.1.2.38 mollom.admin.inc
--- mollom.admin.inc	14 Sep 2010 20:28:45 -0000	1.1.2.38
+++ mollom.admin.inc	14 Sep 2010 23:13:02 -0000
@@ -329,11 +329,6 @@ function mollom_admin_blacklist_form(&$f
     'links' => t('Links'),
     'author' => t('Author name'),
   );
-  $reasons = array(
-    'spam' => t('Spam'),
-    'profanity' => t('Profanity'),
-    'unwanted' => t('Unwanted'),
-  );
 
   $form['blacklist'] = array();
   // Do not retrieve the current blacklist when submitting the form.
@@ -346,7 +341,6 @@ function mollom_admin_blacklist_form(&$f
       $row = array(
         'context' => array('#value' => check_plain($contexts[$entry['context']])),
         'text' => array('#value' => check_plain($entry['text'])),
-        'reason' => array('#value' => check_plain($reasons[$entry['reason']])),
         'text' => array('#value' => check_plain($entry['text'])),
       );
       $row['actions']['delete'] = array(
@@ -369,10 +363,8 @@ function mollom_admin_blacklist_form(&$f
     '#maxlength' => 64,
   );
   $form['entry']['reason'] = array(
-    '#type' => 'select',
-    '#options' => $reasons,
-    '#default_value' => $type,
-    '#required' => TRUE,
+    '#type' => 'value',
+    '#value' => $type,
   );
   $form['entry']['actions'] = array(
     '#tree' => FALSE,
@@ -406,27 +398,24 @@ function theme_mollom_admin_blacklist_fo
   $header = array(
     t('Context'),
     t('Text'),
-    t('Reason'),
     '',
   );
   $rows = array();
 
+  $rows[] = array(
+    drupal_render($form['entry']['context']),
+    drupal_render($form['entry']['text']),
+    drupal_render($form['entry']['actions']),
+  );
+
   foreach (element_children($form['blacklist']) as $id) {
     $rows[] = array(
       drupal_render($form['blacklist'][$id]['context']),
       drupal_render($form['blacklist'][$id]['text']),
-      drupal_render($form['blacklist'][$id]['reason']),
       drupal_render($form['blacklist'][$id]['actions']),
     );
   }
 
-  $rows[] = array(
-    drupal_render($form['entry']['context']),
-    drupal_render($form['entry']['text']),
-    drupal_render($form['entry']['reason']),
-    drupal_render($form['entry']['actions']),
-  );
-
   // This table is never empty due to the form.
   $output  = theme('table', $header, $rows);
   $output .= drupal_render($form);
@@ -441,11 +430,15 @@ function theme_mollom_admin_blacklist_fo
  * @see mollom_admin_blacklist_delete_submit()
  */
 function mollom_admin_blacklist_delete(&$form_state, $key) {
-  $form['#mollom-blacklist-text'] = base64_decode($key);
+  $text = base64_decode($key);
+  $form['text'] = array(
+    '#type' => 'value',
+    '#value' => $text,
+  );
 
   return confirm_form(
     $form,
-    t('Are you sure you want to delete %text from the blacklist?', array('%text' => $form['#mollom-blacklist-text'])),
+    t('Are you sure you want to delete %text from the blacklist?', array('%text' => $text)),
     'admin/settings/mollom/blacklist',
     t('This action cannot be undone.'),
     t('Delete'), t('Cancel')
@@ -456,7 +449,7 @@ function mollom_admin_blacklist_delete(&
  * Form submit handler to delete an entry from the blacklist.
  */
 function mollom_admin_blacklist_delete_submit($form, &$form_state) {
-  $result = mollom('mollom.removeBlacklistText', array('text' => $form['#mollom-blacklist-text']));
+  $result = mollom('mollom.removeBlacklistText', array('text' => $form_state['values']['text']));
 
   if ($result === TRUE) {
     drupal_set_message(t('The entry was removed from the blacklist.'));
Index: tests/mollom.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/tests/mollom.test,v
retrieving revision 1.1.2.59
diff -u -p -r1.1.2.59 mollom.test
--- tests/mollom.test	14 Sep 2010 20:28:45 -0000	1.1.2.59
+++ tests/mollom.test	14 Sep 2010 23:21:44 -0000
@@ -1410,25 +1410,44 @@ class MollomBlacklistTestCase extends Mo
   function testBlacklistUI() {
     // Log in as an administrator and access the blacklist administration page.
     $this->drupalLogin($this->admin_user);
-    $this->drupalGet('admin/settings/mollom/blacklist');
 
-    // Add a word to the text blacklist.
+    // Add a word to the spam blacklist.
+    $this->drupalGet('admin/settings/mollom/blacklist');
     $text = $this->randomName();
     $edit = array(
       'entry[context]' => 'everything',
       'entry[text]' => $text,
-      'entry[reason]' => 'spam',
     );
     $this->drupalPost(NULL, $edit, t('Add'));
     $this->assertText(t('The entry was added to the blacklist.'));
     $this->assertText($text);
 
-    // Remove the word from the text blacklist.
-    $delete_url = 'admin/settings/mollom/blacklist/delete/' . base64_encode($text);
+    // Remove the word from the spam blacklist.
+    $links = $this->xpath('//td[contains(., "' . $text . '")]/following-sibling::td/a');
+    $delete_url = $GLOBALS['base_url'] . (string) $links[0]['href'];
     $this->drupalGet($delete_url);
     $this->drupalPost(NULL, array(), t('Delete'));
     $this->assertEqual($this->getUrl(), url('admin/settings/mollom/blacklist', array('absolute' => TRUE)), t('Correct page redirection.'));
     $this->assertNoText($text, 'Text blacklist removed.');
+
+    // Add a word to the profanity blacklist.
+    $this->drupalGet('admin/settings/mollom/blacklist/profanity');
+    $text = $this->randomName();
+    $edit = array(
+      'entry[context]' => 'everything',
+      'entry[text]' => $text,
+    );
+    $this->drupalPost(NULL, $edit, t('Add'));
+    $this->assertText(t('The entry was added to the blacklist.'));
+    $this->assertText($text);
+
+    // Remove the word from the profanity blacklist.
+    $links = $this->xpath('//td[contains(., "' . $text . '")]/following-sibling::td/a');
+    $delete_url = $GLOBALS['base_url'] . (string) $links[0]['href'];
+    $this->drupalGet($delete_url);
+    $this->drupalPost(NULL, array(), t('Delete'));
+    $this->assertEqual($this->getUrl(), url('admin/settings/mollom/blacklist/profanity', array('absolute' => TRUE)), t('Correct page redirection.'));
+    $this->assertNoText($text, 'Text blacklist removed.');
   }
 }
 
