From: Cash Costello Date: Sun, 11 Sep 2011 00:51:30 +0000 (-0400) Subject: Fixes #3714 also forwarding to the top of the page when a plugin activation fails X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=97c04cab096fb5630a00c69696d4a3864358133d;p=lorea%2Felgg.git Fixes #3714 also forwarding to the top of the page when a plugin activation fails --- 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