Index: nodeasblock.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodeasblock/nodeasblock.module,v
retrieving revision 1.3.2.5
diff -u -r1.3.2.5 nodeasblock.module
--- nodeasblock.module	29 May 2007 03:25:11 -0000	1.3.2.5
+++ nodeasblock.module	5 Jun 2007 17:57:22 -0000
@@ -86,7 +86,8 @@
         '#description' => t('Check this box to create a block for this node. The block will contain the teaser.'),
       );
       
-      // slight change to the UI if the block is required
+      // Slight change to the UI if the block is always created, show disabled control
+      // Note: disabled checkboxes return false values so we have to take care on form submission
       if (variable_get("nodeasblock_$node->type", 1) == 2) {
         $form['nodeasblockset']['nodeasblock']['#default_value'] = true;
         $form['nodeasblockset']['nodeasblock']['#disabled'] = 'disabled';
@@ -157,7 +158,7 @@
       // Fetch block data
       $block = $node->nodeasblockset;
       db_query("DELETE FROM {nodeasblock} WHERE nid = $node->nid");
-      if ($block['nodeasblock']) {
+      if ($block['nodeasblock'] || variable_get("nodeasblock_$node->type", 1) == 2) {
         db_query("INSERT INTO {nodeasblock} VALUES ($node->nid)");
         // This will actually create the block
         _block_rehash();        
@@ -214,7 +215,7 @@
     }
     // Dont show nodes in other languages than current. Integration with i18n node languages. 
     global $locale;
-    if ($node = node_load($delta)) {
+    if ($node = node_load(array('nid' => $delta, 'status' => 1))) {
       if (empty($node->language) || $node->language == $locale) {
         return theme('nodeasblock', $node);
       }
