diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-06 23:03:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-06 23:03:39 +0000 |
commit | 466c8ff543ec24e224d1c03a856d6e89459e4243 (patch) | |
tree | 6134a534b78d21b6418e58d8c842eab2c56fb137 /includes/ajax.inc | |
parent | 8e4d4ec6d922635002e455404189e899665d0126 (diff) | |
download | brdo-466c8ff543ec24e224d1c03a856d6e89459e4243.tar.gz brdo-466c8ff543ec24e224d1c03a856d6e89459e4243.tar.bz2 |
#561858 follow-up by effulgentsia: Avoid clobbering JS settings.
Diffstat (limited to 'includes/ajax.inc')
-rw-r--r-- | includes/ajax.inc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/includes/ajax.inc b/includes/ajax.inc index 1760aac5c..0ec7859aa 100644 --- a/includes/ajax.inc +++ b/includes/ajax.inc @@ -246,6 +246,16 @@ function ajax_render($commands = array()) { } } + // Settings are handled separately, later in this function, so that changes to + // the ajaxPageState setting that occur during drupal_get_css() and + // drupal_get_js() get included, and because the jQuery.extend() code produced + // by drupal_get_js() for adding settings isn't appropriate during an AJAX + // response, because it does not pass TRUE for the "deep" parameter, and + // therefore, can clobber existing settings on the page. + if (isset($items['js']['settings'])) { + unset($items['js']['settings']); + } + // Render the HTML to load these files, and add AJAX commands to insert this // HTML in the page. We pass TRUE as the $skip_alter argument to prevent the // data from being altered again, as we already altered it above. |