### Eclipse Workspace Patch 1.0
#P vendor-DRUPAL-5.1
Index: drupal-contrib/views_bulk_operations/views_bulk_operations.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/views_bulk_operations/views_bulk_operations.module,v
retrieving revision 1.12
diff -u -r1.12 views_bulk_operations.module
--- drupal-contrib/views_bulk_operations/views_bulk_operations.module	10 Aug 2007 16:39:01 -0000	1.12
+++ drupal-contrib/views_bulk_operations/views_bulk_operations.module	22 Aug 2007 17:48:37 -0000
@@ -122,9 +122,16 @@
         '#suffix' => '</div>',
       );
     }
+    
+    // Set up the options, first adding a "0" state option if one was defined in settings.
+    $options = array();
+    if ($first_option = variable_get('views_bulk_operations_select_first_option', '')) {
+      $options[0] = check_plain($first_option);
+    }
     foreach ($all_operations as $operation => $values) {
       $options[$operation] = $values['label'];
     }
+
     $form['action'] = array(
       '#type' => 'select',
       '#title' => '',
@@ -235,6 +242,10 @@
     if (!array_sum($form_values['nodes']['selected'])) { // If all 0, nothing is selected
       form_set_error('nodes', t('No nodes selected.'));
     }
+    // If the user didn't choose an action, set and error and ask them to do so.
+    if (!$form_values['action']) {
+      form_set_error('action', t('Please select and action to perform.'));
+    }
   }
 }
 
@@ -298,6 +309,16 @@
     '#default_value' => variable_get('views_bulk_operations_confirm_max_nodes', '20'),
   );
 
+  // Allow admins to define a "0" state option in the actions dropdown
+  $form['views_bulk_operations_select_first_option'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Action select box first option'),
+    '#size' => 30,
+    '#maxlength' => 64,
+    '#default_value' => variable_get('views_bulk_operations_select_first_option', ''),
+    '#description' => t('Enter the text you want to appear in the first option of the select box. For example: " - Select an action - ". Leave this blank if you don\'t want a "0" state option to appear.'),
+  );
+  
   return system_settings_form($form);
 }
 
