aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-10-10 08:01:17 -0400
committerCash Costello <cash.costello@gmail.com>2011-10-10 08:01:17 -0400
commitf09ec105ae2b73e4a56b04ce87abc5c8d4254158 (patch)
treef4da645925ad3258a1e848ec4c5bcf8a4a485622 /actions
parent3daee8aa3b9ac62cfcba0d6a7e16836468e26884 (diff)
downloadelgg-f09ec105ae2b73e4a56b04ce87abc5c8d4254158.tar.gz
elgg-f09ec105ae2b73e4a56b04ce87abc5c8d4254158.tar.bz2
Fixes #3950 falling back to deprecated view when saving a widget
Diffstat (limited to 'actions')
-rw-r--r--actions/widgets/save.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/widgets/save.php b/actions/widgets/save.php
index 0a2de0c4d..dad48b30b 100644
--- a/actions/widgets/save.php
+++ b/actions/widgets/save.php
@@ -16,7 +16,12 @@ $widget = get_entity($guid);
if ($widget && $widget->saveSettings($params)) {
elgg_set_page_owner_guid($widget->getContainerGUID());
if (!$default_widgets) {
- $view = "widgets/$widget->handler/content";
+ if (elgg_view_exists("widgets/$widget->handler/content")) {
+ $view = "widgets/$widget->handler/content";
+ } else {
+ elgg_deprecated_notice("widgets use content as the display view", 1.8);
+ $view = "widgets/$widget->handler/view";
+ }
echo elgg_view($view, array('entity' => $widget));
}
} else {