From 5a438bf044c88003fd6afd56c6d96c1c82745473 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 18 Jan 2016 22:28:15 +0100 Subject: [PATCH] [jan] Fix returning to last page after problem reporting from AJAX pages (Bug #12112). --- framework/Core/lib/Horde/Registry.php | 7 ++++++- framework/Core/package.xml | 2 ++ horde/js/topbar.js | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 4ce250179df..f7eaa2c369e 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -1472,7 +1472,12 @@ public function getServiceLink($type, $app = null, $full = false) case 'problem': return Horde::url('services/problem.php', $full, $opts) - ->add('return_url', Horde::selfUrl(true, true, true)); + ->add( + 'return_url', + Horde_Util::getFormData( + 'location', Horde::selfUrl(true, true, true) + ) + ); case 'sidebar': return Horde::url('services/sidebar.php', $full, $opts); diff --git a/framework/Core/package.xml b/framework/Core/package.xml index 64ca0c7a27a..8b9b8265eb4 100644 --- a/framework/Core/package.xml +++ b/framework/Core/package.xml @@ -39,6 +39,7 @@ LGPL-2.1 +* [jan] Fix returning to last page after problem reporting from AJAX pages (Bug #12112). * [jan] Fix updating group cache with LDAP backend. * [jan] Horde_Registry_Nlsconfig#validLang() checks now if a locale is installed (Request #10457). * [jan] Mark PHP 7 as supported. @@ -4122,6 +4123,7 @@ 2016-01-05 LGPL-2.1 +* [jan] Fix returning to last page after problem reporting from AJAX pages (Bug #12112). * [jan] Fix updating group cache with LDAP backend. * [jan] Horde_Registry_Nlsconfig#validLang() checks now if a locale is installed (Request #10457). * [jan] Mark PHP 7 as supported. diff --git a/horde/js/topbar.js b/horde/js/topbar.js index d2609fbc08b..fbf795dbe27 100644 --- a/horde/js/topbar.js +++ b/horde/js/topbar.js @@ -27,7 +27,8 @@ var HordeTopbar = { { HordeCore.doAction('topbarUpdate', { app: this.conf.app, - hash: this.conf.hash + hash: this.conf.hash, + location: window.location.href }, { callback: this.onUpdateTopbar.bind(this), uri: this.conf.URI_AJAX