aboutsummaryrefslogtreecommitdiff
path: root/actions/widgets/move.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-19 03:28:41 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-19 03:28:41 +0000
commit4dc9076224a0d93f0dc078124aa9fb94a669f16c (patch)
treec4fb116cfab0dab64f92e3183012515322b04b30 /actions/widgets/move.php
parent28a52ae81a78bff05d864dce226d3b1a9517a8c3 (diff)
downloadelgg-4dc9076224a0d93f0dc078124aa9fb94a669f16c.tar.gz
elgg-4dc9076224a0d93f0dc078124aa9fb94a669f16c.tar.bz2
saving widget position after moving
git-svn-id: http://code.elgg.org/elgg/trunk@7343 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/widgets/move.php')
-rw-r--r--actions/widgets/move.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/actions/widgets/move.php b/actions/widgets/move.php
new file mode 100644
index 000000000..2747c149f
--- /dev/null
+++ b/actions/widgets/move.php
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Elgg widget move action
+ *
+ * @package Elgg.Core
+ * @subpackage Widgets.Management
+ */
+
+$guid = get_input('guid');
+$column = get_input('column', 1);
+$position = get_input('position');
+
+$user = get_loggedin_user();
+
+$widget = get_entity($guid);
+if ($widget && $user->canEdit()) {
+ elgg_move_widget($widget, $widget->context, $column, $position);
+ forward(REFERER);
+}
+
+register_error(elgg_echo('widgets:move:failure'));
+forward(REFERER); \ No newline at end of file