summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--admin_menu.module7
2 files changed, 3 insertions, 5 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 632923a..e6325b6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Admin Menu x.x-x.x, xxxx-xx-xx
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.
diff --git a/admin_menu.module b/admin_menu.module
index 0c5fa85..203f7ad 100644
--- a/admin_menu.module
+++ b/admin_menu.module
@@ -196,7 +196,7 @@ function admin_menu_init() {
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;
@@ -486,6 +486,7 @@ function theme_admin_menu_links(&$elements, $depth = 0) {
if (!isset($destination)) {
$destination = drupal_get_destination();
+ $destination = $destination['destination'];
}
$output = '';
@@ -522,12 +523,8 @@ function theme_admin_menu_links(&$elements, $depth = 0) {
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';
}