Index: notifications_content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/notifications/notifications_content/notifications_content.module,v
retrieving revision 1.4.2.9.2.36.2.10
diff -u -r1.4.2.9.2.36.2.10 notifications_content.module
--- notifications_content.module	11 Jun 2009 16:28:03 -0000	1.4.2.9.2.36.2.10
+++ notifications_content.module	15 Jul 2009 17:42:49 -0000
@@ -373,14 +373,14 @@
         $access = TRUE;
         if (!empty($object->fields['nid'])) {
           if ($node = node_load($object->fields['nid'])) {
-            $access =  notifications_content_node_allow($account, $node);
+            $access =  notifications_content_node_allow($account, $node) && notifications_content_type_enabled($node->type, $object->type);
           }
           else {
             $access = FALSE;
           }
         }
         if (!empty($object->fields['type'])) {
-          $access = $access && array_key_exists($object->fields['type'], notifications_content_types());
+          $access = $access && notifications_content_type_enabled($object->fields['type'], $object->type);
         } 
       }
       // We return an array that will be merged with the ones from other modules
@@ -754,6 +754,8 @@
  * 
  * @param $field
  *   Optional field to return as array value. If none it will return the full objects.
+ * @param $subs_type
+ *   Optional type of subscription for which to find allowed content types. Defaults to nodetype, can be any subscription type with event-type=node for which notifications_content handles content type settings.
  */
 function notifications_content_types($field = 'name', $subs_type = 'nodetype') {
   // Get list of available node types, all of them will be allowed by default
@@ -774,8 +776,11 @@
 
 /**
  * Get subscription options for this content type
- * - All enabled options if ($option = NULL)
- * - TRUE / FALSE for a given $option
+ *
+ * @param $type
+ *   Optional content type to return info for, defaults to global notifications defaults.
+ * @param $option
+ *   Optional option to return for the given content type or the defaults, defaults to returning all settings for the type.
  */
 function notifications_content_type_enabled($type = NULL, $option = NULL) {
   $defaults = variable_get('notifications_content_type', array());
