Index: location.module
===================================================================
--- location.module	(revision 251)
+++ location.module	(working copy)
@@ -758,16 +758,20 @@
       )
     );
 
-    for ($index = 0; $index < $location_form_count; $index++) {
-      $form['locations'][$index] = array_merge(
-        is_array($form['locations'][$index]) ? $form['locations'][$index] : array(),
-        array(
-          '#type' => 'fieldset',
-          '#title' => t('Location #%number', array('%number' => $index + 1)),
-          '#tree' => TRUE,
-          '#attributes' => array('class' => 'location')
-        )
-      );
+    if (variable_get('location_maxnum_'. $form['type']['#value'], 1) > 1) {
+      for ($index = 0; $index < $location_form_count; $index++) {
+        $form['locations'][$index] = array_merge(
+          is_array($form['locations'][$index]) ?
+            $form['locations'][$index] :
+            array(),
+          array(
+            '#type' => 'fieldset',
+            '#title'=> t('Location #%number', array('%number' => $index + 1)),
+            '#tree' => TRUE,
+            '#attributes' => array('class' => 'location'),
+          )
+        );
+      }
     }
     
     if ($location_form_count == 1) {
