diff --git a/includes/plugins.inc b/includes/plugins.inc index 9077d38..321880f 100644 --- a/includes/plugins.inc +++ b/includes/plugins.inc @@ -175,12 +175,12 @@ class panels_cache_object { // If there are any differences between the old and the new javascript then // store them to be added later. - if ($diff = array_diff_assoc($js, $start)) { + if ($diff = drupal_array_diff_assoc_recursive($js, $start)) { $this->js = $diff; } // Special case the settings key and get the difference of the data. - if ($settings_diff = array_diff_assoc($js['settings']['data'], $start['settings']['data'])) { + if ($settings_diff = drupal_array_diff_assoc_recursive($js['settings']['data'], $start['settings']['data'])) { $this->js['settings'] = $settings_diff; } @@ -210,7 +210,11 @@ class panels_cache_object { if (!empty($this->js)) { foreach ($this->js as $key => $args) { if ($key !== 'settings') { - drupal_add_js($args['data'], $args); + $js = $key; + if (isset($args['data'])) { + $js = $args['data']; + } + drupal_add_js($js, $args); } else { foreach ($args as $setting) { diff --git a/panels.info b/panels.info index 70b961d..5aa334b 100644 --- a/panels.info +++ b/panels.info @@ -4,6 +4,7 @@ core = 7.x package = "Panels" configure = admin/structure/panels dependencies[] = ctools +dependencies[] = system (>=7.23) files[] = panels.module files[] = includes/common.inc files[] = includes/legacy.inc