? 595972_23.patch
? 595972_25.patch
? 595972_ajax_settings.patch
? drupal7.kpf
? drupal_ajax_extends_settings.patch
? partial_validation_0.patch
? sites/all/modules/quicktabs
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: includes/ajax.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/ajax.inc,v
retrieving revision 1.14
diff -u -p -r1.14 ajax.inc
--- includes/ajax.inc	13 Oct 2009 21:16:42 -0000	1.14
+++ includes/ajax.inc	15 Oct 2009 03:19:41 -0000
@@ -726,24 +726,33 @@ function ajax_command_css($selector, $ar
 /**
  * Creates a Drupal AJAX 'settings' command.
  *
- * The 'settings' command instructs the client to extend Drupal.settings with
- * the given array.
+ * The 'settings' command instructs the client either to use the given
+ * array as the settings for ajax-loaded content or to extend
+ * Drupal.settings with the given array, depending on the value of
+ * the $merge parameter.
  *
  * This command is implemented by Drupal.ajax.prototype.commands.settings()
  * defined in misc/ajax.js.
  *
  * @param $argument
- *   An array of key/value pairs to add to the settings. This will be utilized
- *   for all commands after this if they do not include their own settings
- *   array.
+ *   An array of key/value pairs to add to the settings. This, or a merge of
+ *   this with the global Drupal.settings, will be utilized for all 
+ *   commands after this if they do not include their own settings array.
+ *
+ * @param $merge
+ *   Whether or not the settings should be merged into the existing
+ *   Drupal.settings for the page. When set to FALSE (the default),
+ *   the settings array passed to Drupal.attachBehaviors will not include
+ *   the global Drupal.settings.
  *
  * @return
  *   An array suitable for use with the ajax_render() function.
  */
-function ajax_command_settings($argument) {
+function ajax_command_settings($argument, $merge = FALSE) {
   return array(
     'command' => 'settings',
-    'argument' => $argument,
+    'settings' => $argument,
+    'merge' => $merge,
   );
 }
 
Index: misc/ajax.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/ajax.js,v
retrieving revision 1.3
diff -u -p -r1.3 ajax.js
--- misc/ajax.js	2 Oct 2009 14:55:40 -0000	1.3
+++ misc/ajax.js	15 Oct 2009 03:19:41 -0000
@@ -359,7 +359,12 @@ Drupal.ajax.prototype.commands = {
    * Command to set the settings that will be used for other commands in this response.
    */
   settings: function (ajax, response, status) {
-    ajax.settings = response.settings;
+    if (response.merge) {
+      $.extend(true, Drupal.settings, response.settings);
+    }
+    else {
+      ajax.settings = response.settings;
+    }
   },
 
   /**
