aboutsummaryrefslogtreecommitdiff
path: root/actions/widgets/delete.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 02:12:32 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-19 02:12:32 +0000
commit373ff03a2b6315eea13a97065774972ad3713ab6 (patch)
treedf051d2a4c1d150fd75b2f3db2d4647a5e1ebda9 /actions/widgets/delete.php
parent06f0e7b1aa5f6fd393d9a0b580f94709e29e10df (diff)
downloadelgg-373ff03a2b6315eea13a97065774972ad3713ab6.tar.gz
elgg-373ff03a2b6315eea13a97065774972ad3713ab6.tar.bz2
Fixes #2753: Default widgets merged into core as extensible admin section and updated to work with new widgets. Will need an upgrade for users running the old default widgets in 1.7.
git-svn-id: http://code.elgg.org/elgg/trunk@8302 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/widgets/delete.php')
-rw-r--r--actions/widgets/delete.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/actions/widgets/delete.php b/actions/widgets/delete.php
index 5b8aaf75e..47920013d 100644
--- a/actions/widgets/delete.php
+++ b/actions/widgets/delete.php
@@ -6,12 +6,13 @@
* @subpackage Widgets.Management
*/
-$guid = get_input('guid');
+$widget_guid = get_input('widget_guid');
+$owner_guid = get_input('owner_guid', elgg_get_logged_in_user_guid());
-$user = elgg_get_logged_in_user_entity();
+$widget = get_entity($widget_guid);
+$owner = get_entity($owner_guid);
-$widget = get_entity($guid);
-if ($widget && $user->canEdit() && $widget->delete()) {
+if ($widget && $owner->canEdit() && $widget->delete()) {
forward(REFERER);
}