diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-17 15:19:37 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-02-17 15:19:37 +0000 |
commit | cf34a08db9303453f3066cb2068d861f060ebc81 (patch) | |
tree | 8771ee0b064f1cc1b039917bbc62a4964699d3fa | |
parent | cce1163a3a0b25f781a62ec2d1492e53333d7573 (diff) | |
download | elgg-cf34a08db9303453f3066cb2068d861f060ebc81.tar.gz elgg-cf34a08db9303453f3066cb2068d861f060ebc81.tar.bz2 |
Closes #763: A message is now displayed for widgets belonging to disabled plugins explaining what has happened.
git-svn-id: https://code.elgg.org/elgg/trunk@2785 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | languages/en.php | 2 | ||||
-rw-r--r-- | views/default/widgets/wrapper.php | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/languages/en.php b/languages/en.php index 6465ec785..f27c7aacc 100644 --- a/languages/en.php +++ b/languages/en.php @@ -219,7 +219,7 @@ To remove a widget drag it back to the <b>Widget gallery</b>.", 'widgets:panel:save:failure' => "There was a problem saving your widgets. Please try again.",
'widgets:save:success' => "The widget was successfully saved.",
'widgets:save:failure' => "We could not save your widget. Please try again.",
-
+ 'widgets:handlernotfound' => 'This widget is either broken or has been disabled by the site administrator.',
/**
* Groups
diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 846cf9e7f..63c024cc4 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -20,6 +20,8 @@ if ($vars['entity'] instanceof ElggObject && $vars['entity']->getSubtype() == 'widget') {
$handler = $vars['entity']->handler;
$title = $widgettypes[$vars['entity']->handler]->name;
+ if (!$title)
+ $title = $handler;
} else {
$handler = "error";
$title = elgg_echo("error");
@@ -63,7 +65,10 @@ } else { // end if callback != "true"
- echo elgg_view("widgets/{$handler}/view",$vars);
+ if (elgg_view_exists("widgets/{$handler}/view"))
+ echo elgg_view("widgets/{$handler}/view",$vars);
+ else
+ echo elgg_echo('widgets:handlernotfound');
?>
|