diff options
Diffstat (limited to 'actions/widgets/move.php')
-rw-r--r-- | actions/widgets/move.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/actions/widgets/move.php b/actions/widgets/move.php index 2edc7912e..eab650c9c 100644 --- a/actions/widgets/move.php +++ b/actions/widgets/move.php @@ -6,14 +6,16 @@ * @subpackage Widgets.Management */ -$guid = get_input('guid'); +$widget_guid = get_input('widget_guid'); $column = get_input('column', 1); $position = get_input('position'); +$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()) { + +if ($widget && $owner->canEdit()) { $widget->move($column, $position); forward(REFERER); } |