#1393752 by dereine: Clear the title on arguments when the checkbox on unchecked
authorDaniel Wehner
Thu, 16 Feb 2012 19:49:22 +0000 (20:49 +0100)
committerDaniel Wehner
Thu, 16 Feb 2012 19:49:22 +0000 (20:49 +0100)
handlers/views_handler_argument.inc

index 0baeed1..72c07e2 100644 (file)
@@ -461,6 +461,12 @@ class views_handler_argument extends views_handler {
       // Copy the now submitted options to their final resting place so they get saved.
       $form_state['values']['options']['validate_options'] = $options;
     }
+
+    // Clear out the content of title if it's not enabled.
+    $options =& $form_state['values']['options'];
+    if (empty($options['title_enable'])) {
+      $options['title'] = '';
+    }
   }
 
   /**