aboutsummaryrefslogtreecommitdiff
path: root/actions/widgets/save.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 14:33:17 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 14:33:17 +0000
commit95c79a67493521d2d9761fde60ccfbf2af48ce87 (patch)
tree57d7652f060a968efab7a6a6842d160bf0c73e5d /actions/widgets/save.php
parent4dcea7b5aa7b6a597a5d2d086f99dee6f57f9004 (diff)
downloadelgg-95c79a67493521d2d9761fde60ccfbf2af48ce87.tar.gz
elgg-95c79a67493521d2d9761fde60ccfbf2af48ce87.tar.bz2
moved save widget settings function to ElggWidget
git-svn-id: http://code.elgg.org/elgg/trunk@7383 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/widgets/save.php')
-rw-r--r--actions/widgets/save.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/actions/widgets/save.php b/actions/widgets/save.php
index 13ea90e85..8854d7810 100644
--- a/actions/widgets/save.php
+++ b/actions/widgets/save.php
@@ -9,15 +9,12 @@
$guid = get_input('guid');
$params = get_input('params');
-$result = elgg_save_widget_settings($guid, $params);
-
-if (!$result) {
- register_error(elgg_echo('widgets:save:failure'));
-} else {
- // send back the widget contents
- $widget = get_entity($guid);
+$widget = get_entity($guid);
+if ($widget && $widget->saveSettings($params)) {
$view = "widgets/$widget->handler/view";
echo elgg_view($view, array('entity' => $widget));
+} else {
+ register_error(elgg_echo('widgets:save:failure'));
}
forward(REFERER); \ No newline at end of file