Index: mollom.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.admin.inc,v
retrieving revision 1.45
diff -u -p -r1.45 mollom.admin.inc
--- mollom.admin.inc	3 Nov 2010 13:00:43 -0000	1.45
+++ mollom.admin.inc	3 Nov 2010 13:50:11 -0000
@@ -25,10 +25,31 @@ function mollom_admin_form_list() {
     t('Protection mode'),
     array('data' => t('Operations'), 'colspan' => 2),
   );
-  $rows = array();
   $result = db_query('SELECT form_id FROM {mollom_form}')->fetchCol();
+  $forms = array();
+  $module_info = system_get_info('module');
+  $rows = array();
   foreach ($result as $form_id) {
-    $mollom_form = mollom_form_load($form_id);
+    $forms[$form_id] = mollom_form_load($form_id);
+    // system_get_info() only supports enabled modules. Default to the module's
+    // machine name in case it is disabled.
+    $module = $forms[$form_id]['module'];
+    if (!isset($module_info[$module])) {
+      $module_info[$module]['name'] = $module;
+    }
+    $forms[$form_id]['title'] = t('!module: !form-title', array(
+      '!form-title' => $forms[$form_id]['title'],
+      '!module' => t($module_info[$module]['name']),
+    ));
+  }
+
+  // Sort forms by title (including module name prefix).
+  // @todo D7: Move into common.inc.
+  module_load_include('inc', 'system', 'system.admin');
+  uasort($forms, 'system_sort_by_title');
+
+  $rows = array();
+  foreach ($forms as $form_id => $mollom_form) {
     $row = array();
     $row[] = $mollom_form['title'];
     if ($mollom_form['mode'] == MOLLOM_MODE_ANALYSIS) {
@@ -83,21 +104,26 @@ function mollom_admin_form_options() {
   }
 
   // Load module information.
-  $modules = module_implements('mollom_form_info');
-  $modules = db_query("SELECT name, info FROM {system} WHERE type = :type AND name IN (:name)", array(':type' => 'module', ':name' => $modules))->fetchAllKeyed();
-  foreach ($modules as $name => $info) {
-    $module_info = unserialize($info);
-    $modules[$name] = t($module_info['name']);
-  }
+  $module_info = system_get_info('module');
 
   // Transform form information into an associative array suitable for #options.
+  $options = array();
   foreach ($form_list as $form_id => $info) {
-    $form_list[$form_id] = $modules[$info['module']] . ': ' . $info['title'];
+    // system_get_info() only supports enabled modules. Default to the module's
+    // machine name in case it is disabled.
+    $module = $info['module'];
+    if (!isset($module_info[$module])) {
+      $module_info[$module]['name'] = $module;
+    }
+    $options[$form_id] = t('!module: !form-title', array(
+      '!form-title' => $info['title'],
+      '!module' => t($module_info[$module]['name']),
+    ));
   }
   // Sort form options by title.
-  asort($form_list);
+  asort($options);
 
-  return $form_list;
+  return $options;
 }
 
 /**
Index: mollom.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mollom/mollom.module,v
retrieving revision 1.93
diff -u -p -r1.93 mollom.module
--- mollom.module	3 Nov 2010 13:00:43 -0000	1.93
+++ mollom.module	3 Nov 2010 13:53:35 -0000
@@ -2159,7 +2159,7 @@ function node_mollom_form_info($form_id)
   $type = node_type_get_type($nodetype);
   $form_info = array(
     // @todo This is incompatible with node access.
-    'bypass access' => array('bypass node access', 'edit any ' . $type->type . ' content'),
+    'bypass access' => array('bypass node access'),
     'bundle' => $type->type,
     'moderation callback' => 'node_mollom_form_moderation',
     'elements' => array(),
@@ -2168,6 +2168,11 @@ function node_mollom_form_info($form_id)
       'author_name' => 'name',
     ),
   );
+  // @see node_permission()
+  if (in_array($type->type, node_permissions_get_configured_types())) {
+    $form_info['bypass access'][] = 'edit any ' . $type->type . ' content';
+    $form_info['bypass access'][] = 'delete any ' . $type->type . ' content';
+  }
   // @see node_content_form()
   if ($type->has_title) {
     $form_info['elements']['title'] = check_plain($type->title_label);
