Admin Menu 7.x-3.x, xxxx-xx-xx
------------------------------
+#578520 by sun: Fixed destination query parameter is processed wrongly.
#578520 by sun: Updated for $query in url() should always be an array.
#557062 by Dave Reid: Fixed undefined Drupal.admin error when including
admin_menu_toolbar.js before admin_menu.js.
drupal_add_js($path . '/admin_menu.js', array('defer' => TRUE));
// Destination query strings are applied via JS.
- $settings['destination'] = drupal_get_destination();
+ $settings = drupal_get_destination();
// Hash for client-side HTTP/AJAX caching.
$cid = 'admin_menu:' . $user->uid . ':' . $language->language;
if (!isset($destination)) {
$destination = drupal_get_destination();
+ $destination = $destination['destination'];
}
$output = '';
if (isset($elements[$path]['#href'])) {
// Strip destination query string from href attribute and apply a CSS class
// for our JavaScript behavior instead.
- $class = FALSE;
if (isset($elements[$path]['#options']['query']['destination']) && $elements[$path]['#options']['query']['destination'] == $destination) {
unset($elements[$path]['#options']['query']['destination']);
- $class = TRUE;
- }
- if ($class) {
$elements[$path]['#options']['attributes']['class'][] = 'admin-menu-destination';
}