Index: mollom.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.admin.inc,v
retrieving revision 1.38
diff -u -p -r1.38 mollom.admin.inc
--- mollom.admin.inc	19 Sep 2010 12:37:20 -0000	1.38
+++ mollom.admin.inc	20 Sep 2010 01:12:59 -0000
@@ -340,18 +340,16 @@ function mollom_admin_blacklist_form($fo
         'context' => array('#markup' => check_plain($contexts[$entry['context']])),
         'text' => array('#markup' => check_plain($entry['text'])),
       );
-      $delete_url_parts = array(
-        'admin/config/content/mollom/blacklist/delete',
-        base64_encode($entry['text']),
-        $entry['context'],
-        $entry['reason'],
-      );
       $row['actions']['delete'] = array(
         '#type' => 'link',
         '#title' => t('delete'),
-        '#href' => implode('/', $delete_url_parts),
+        '#href' => 'admin/config/content/mollom/blacklist/delete',
         '#options' => array(
-          'query' => drupal_get_destination(),
+          'query' => array(
+            'text' => $entry['text'],
+            'context' => $entry['context'],
+            'reason' => $entry['reason'],
+          ) + drupal_get_destination(),
         ),
       );
       $form['blacklist'][$id] = $row;
@@ -466,24 +464,23 @@ function theme_mollom_admin_blacklist_fo
  * @ingroup forms
  * @see mollom_admin_blacklist_delete_submit()
  */
-function mollom_admin_blacklist_delete($form, &$form_state, $key, $context, $reason) {
-  $text = base64_decode($key);
+function mollom_admin_blacklist_delete($form, &$form_state) {
   $form['text'] = array(
     '#type' => 'value',
-    '#value' => $text,
+    '#value' => $_GET['text'],
   );
   $form['context'] = array(
     '#type' => 'value',
-    '#value' => $context,
+    '#value' => $_GET['context'],
   );
   $form['reason'] = array(
     '#type' => 'value',
-    '#value' => $reason,
+    '#value' => $_GET['reason'],
   );
 
   return confirm_form(
     $form,
-    t('Are you sure you want to delete %text from the blacklist?', array('%text' => $text)),
+    t('Are you sure you want to delete %text from the blacklist?', array('%text' => $_GET['text'])),
     'admin/config/content/mollom/blacklist',
     t('This action cannot be undone.'),
     t('Delete'), t('Cancel')
Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.82
diff -u -p -r1.82 mollom.module
--- mollom.module	19 Sep 2010 12:37:20 -0000	1.82
+++ mollom.module	19 Sep 2010 21:36:43 -0000
@@ -169,7 +169,9 @@ function mollom_init() {
       // Fetch and display requirements error message, without re-checking.
       module_load_install('mollom');
       $requirements = mollom_requirements('runtime', FALSE);
-      drupal_set_message($requirements['mollom']['description'], 'error');
+      if (isset($requirements['mollom']['description'])) {
+        drupal_set_message($requirements['mollom']['description'], 'error');
+      }
     }
   }
 }
Index: tests/mollom.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/tests/mollom.test,v
retrieving revision 1.60
diff -u -p -r1.60 mollom.test
--- tests/mollom.test	19 Sep 2010 12:37:20 -0000	1.60
+++ tests/mollom.test	20 Sep 2010 01:16:54 -0000
@@ -154,7 +154,16 @@ class MollomWebTestCase extends DrupalWe
       ->condition('w.type', 'mollom')
       ->orderBy('w.timestamp', 'ASC');
     foreach ($query->execute() as $row) {
-      if ($no_fail_expected ? $row->severity >= WATCHDOG_NOTICE : $row->severity < WATCHDOG_NOTICE) {
+      // In case no fail is expected, only log messages with a severity of
+      // WATCHDOG_NOTICE or less severe messages must pass. More severe messages
+      // need to fail. The comparison logic applied here is a bit confusing,
+      // since the values of watchdog severity level constants are negated to
+      // their actual "severity level" meaning:
+      // WATCHDOG_EMERGENCY is 0, WATCHDOG_NOTICE is 5, WATCHDOG_DEBUG is 7.
+      // In case a fail is expected, all messages always pass, since we would
+      // otherwise trigger a false positive test failure if there are additional
+      // non-severe log messages.
+      if (!$no_fail_expected || $row->severity >= WATCHDOG_NOTICE) {
         $this->pass(theme_dblog_message(array('event' => $row, 'link' => FALSE)), t('Watchdog'));
       }
       else {
@@ -1298,6 +1307,8 @@ class MollomLanguageDetectionTestCase ex
  * the same blacklist. You can configure a custom key to avoid this.
  */
 class MollomBlacklistTestCase extends MollomWebTestCase {
+  protected $profile = 'testing';
+
   public static function getInfo() {
     return array(
       'name' => 'Blacklist',
@@ -1306,6 +1317,12 @@ class MollomBlacklistTestCase extends Mo
     );
   }
 
+  function setUp() {
+    $this->disableDefaultSetup = TRUE;
+    parent::setUp('mollom');
+    $this->setKeys();
+  }
+
   /**
    * Test the URL blacklist functionality at the API level without using a web interface.
    */
@@ -1313,7 +1330,7 @@ class MollomBlacklistTestCase extends Mo
     // Remove any stale blacklist entries from test runs that did not finish.
     $blacklist = mollom('mollom.listBlacklistURL');
     foreach ($blacklist as $entry) {
-      if (strtotime($entry['created']) - REQUEST_TIME > 86400) {
+      if (REQUEST_TIME - strtotime($entry['created']) > 86400) {
         mollom('mollom.removeBlacklistURL', array('url' => $entry['url']));
       }
     }
@@ -1363,7 +1380,7 @@ class MollomBlacklistTestCase extends Mo
     // Remove any stale blacklist entries from test runs that did not finish.
     $blacklist = mollom('mollom.listBlacklistText');
     foreach ($blacklist as $entry) {
-      if (strtotime($entry['created']) - REQUEST_TIME > 86400) {
+      if (REQUEST_TIME - strtotime($entry['created']) > 86400) {
         mollom('mollom.removeBlacklistText', array(
           'text' => $entry['text'],
           'context' => $entry['context'],
@@ -1431,6 +1448,7 @@ class MollomBlacklistTestCase extends Mo
       'context' => 'everything',
       'reason' => 'spam',
     ));
+    $this->assertMollomWatchdogMessages(FALSE);
     $this->assertNotIdentical($result, TRUE, t('Error response for a non-existing blacklist text found.'));
   }
 
@@ -1443,6 +1461,10 @@ class MollomBlacklistTestCase extends Mo
    */
   function testBlacklistUI() {
     // Log in as an administrator and access the blacklist administration page.
+    $this->admin_user = $this->drupalCreateUser(array(
+      'administer mollom',
+      'access administration pages',
+    ));
     $this->drupalLogin($this->admin_user);
 
     // Add a word to the spam blacklist.
@@ -1453,6 +1475,7 @@ class MollomBlacklistTestCase extends Mo
       'entry[context]' => 'everything',
     );
     $this->drupalPost(NULL, $edit, t('Add'));
+    $text = drupal_strtolower($text);
     $this->assertText(t('The entry was added to the blacklist.'));
     $this->assertText($text);
 
@@ -1475,6 +1498,7 @@ class MollomBlacklistTestCase extends Mo
     );
     $this->drupalPost(NULL, $edit, t('Add'));
     $this->assertText(t('The entry was added to the blacklist.'));
+    $text = drupal_strtolower($text);
     $this->assertText($text);
 
     // Remove the word from the profanity blacklist.
