Index: auto_nodetitle.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/auto_nodetitle/auto_nodetitle.module,v
retrieving revision 1.4.2.14
diff -u -r1.4.2.14 auto_nodetitle.module
--- auto_nodetitle.module	7 Apr 2007 15:25:20 -0000	1.4.2.14
+++ auto_nodetitle.module	10 Sep 2007 15:00:42 -0000
@@ -29,6 +29,10 @@
       $form['title']['#type'] = 'value';
       $form['title']['#required'] = FALSE;
     }
+    else if (variable_get('ant_titleoptional_'. $form['#node']->type, 0)) {
+      // we will make the title optional
+      $form['title']['#required'] = FALSE;
+    }
   }
 }
 
@@ -48,6 +52,12 @@
     auto_nodetitle_set_title($node);
     form_set_value($form['title'], $node->title);
   }
+  else if ($op == 'validate' && variable_get('ant_titleoptional_'. $node->type, 0)) {  
+    if (empty($node->title)) {
+      auto_nodetitle_set_title($node);
+      form_set_value($form['title'], $node->title);
+    }
+  }
 }
 
 /*
@@ -112,6 +122,12 @@
     '#title' => t('Automatically generate the node title and hide the node title field.'),
     '#default_value' => variable_get('ant_'. $form['#node_type']->type, 0),
   );
+  $form['auto_nodetitle']['ant_titleoptional'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Title Optional'),
+    '#description' => t('Node titles become optional, applying the automatic node title pattern only if a title is not provided.'),
+    '#default_value' => variable_get('ant_titleoptional_'. $form['#node_type']->type, 0),
+  );
 
   if (module_exists('token') || user_access('use PHP for title patterns')) {
     

