aboutsummaryrefslogtreecommitdiff
path: root/views/default/page/components/widget.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 /views/default/page/components/widget.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 'views/default/page/components/widget.php')
-rw-r--r--views/default/page/components/widget.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/views/default/page/components/widget.php b/views/default/page/components/widget.php
index d5e2c4ca2..e7a16b318 100644
--- a/views/default/page/components/widget.php
+++ b/views/default/page/components/widget.php
@@ -33,15 +33,18 @@ $controls = elgg_view('layout/objects/widget/controls', array(
'show_edit' => $edit_area != '',
));
-
-if (elgg_view_exists("widgets/$handler/content")) {
- $content = elgg_view("widgets/$handler/content", $vars);
+// don't show content for default widgets
+if (elgg_in_context('default_widgets')) {
+ $content = '';
} else {
- elgg_deprecated_notice("widgets use content as the display view", 1.8);
- $content = elgg_view("widgets/$handler/view", $vars);
+ if (elgg_view_exists("widgets/$handler/content")) {
+ $content = elgg_view("widgets/$handler/content", $vars);
+ } else {
+ elgg_deprecated_notice("widgets use content as the display view", 1.8);
+ $content = elgg_view("widgets/$handler/view", $vars);
+ }
}
-
$widget_id = "elgg-widget-$widget->guid";
$widget_instance = "elgg-widget-instance-$handler";
$widget_class = "elgg-module elgg-module-widget";