# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: contributions/modules/user_relationships/user_relationships_ui/user_relationships_ui.module
--- contributions/modules/user_relationships/user_relationships_ui/user_relationships_ui.module Base (1.1.2.28)
+++ contributions/modules/user_relationships/user_relationships_ui/user_relationships_ui.module Locally Modified (Based On 1.1.2.28)
@@ -652,12 +652,6 @@
       && variable_get('user_relationships_ui_require_approval', TRUE)
       && user_access('maintain own relationships', $account)
     ) {
-      $form['user_relationships_ui_settings'] = array(
-        '#type'   => 'fieldset',
-        '#title'  => t('Relationship settings'),
-        '#weight' => 5,
-        '#collapsible' => TRUE,
-      );
 
       if (variable_get('user_relationships_allow_auto_approve', FALSE) && ($relationships = user_relationships_types_load())) {
         if (!is_array($edit['user_relationships_ui_auto_approve'])) {
@@ -670,6 +664,16 @@
             $options[$relationship->rtid] = tt("user_relationships:rtid:$relationship->rtid:name", $relationship->name);
           }
         }
+
+        //#453090 Do nothing if there are no options.
+        if (count($options)) {
+          $form['user_relationships_ui_settings'] = array(
+            '#type'   => 'fieldset',
+            '#title'  => t('Relationship settings'),
+            '#weight' => 5,
+            '#collapsible' => TRUE,
+          );
+
         $form['user_relationships_ui_settings']['user_relationships_ui_auto_approve'] = array(
           '#type'           => 'checkboxes',
           '#title'          => t('Automatically approve the following relationship requests'),
@@ -677,9 +681,6 @@
           '#default_value'  => $edit['user_relationships_ui_auto_approve'],
           '#description'    => t("Check off the types of relationships you'd like to automatically approve.")
         );
-        //#453090 hide if there are no options
-        if (!count($options)) {
-          unset($form['user_relationships_ui_settings']['user_relationships_ui_auto_approve']);
         }
       }
     }
