From 97c04cab096fb5630a00c69696d4a3864358133d Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 10 Sep 2011 20:51:30 -0400 Subject: Fixes #3714 also forwarding to the top of the page when a plugin activation fails --- actions/admin/plugins/activate.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/admin/plugins/activate.php b/actions/admin/plugins/activate.php index 5a945e8eb..0049878e3 100644 --- a/actions/admin/plugins/activate.php +++ b/actions/admin/plugins/activate.php @@ -47,5 +47,10 @@ if (count($activated_guids) === 1) { $plugin = get_entity($plugin_guids[0]); forward("$url#{$plugin->getID()}"); } else { - forward(REFERER); + // forward to top of page with a failure so remove any #foo + $url = $_SERVER['HTTP_REFERER']; + if (strpos($url, '#')) { + $url = substr(0, strpos($url, '#')); + } + forward($url); } \ No newline at end of file -- cgit v1.2.3