aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/plugins/activate.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-09-10 20:51:30 -0400
committerCash Costello <cash.costello@gmail.com>2011-09-10 20:51:30 -0400
commit97c04cab096fb5630a00c69696d4a3864358133d (patch)
treea9d91b68ade1f5029c594732cb0b802254b39bb3 /actions/admin/plugins/activate.php
parente5eb0c827671e7d0a4983839c30c5da0156ee231 (diff)
downloadelgg-97c04cab096fb5630a00c69696d4a3864358133d.tar.gz
elgg-97c04cab096fb5630a00c69696d4a3864358133d.tar.bz2
Fixes #3714 also forwarding to the top of the page when a plugin activation fails
Diffstat (limited to 'actions/admin/plugins/activate.php')
-rw-r--r--actions/admin/plugins/activate.php7
1 files changed, 6 insertions, 1 deletions
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