aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-30 12:00:12 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-30 12:00:12 -0700
commit3f9abf384029bf3fc899be2eead4e3121d20e331 (patch)
treecddfec4455313a67c414072aadd63e439dc910fd
parenta50dd81e3737d8dc14f4a700255b3a19c58988b1 (diff)
downloadelgg-3f9abf384029bf3fc899be2eead4e3121d20e331.tar.gz
elgg-3f9abf384029bf3fc899be2eead4e3121d20e331.tar.bz2
Fixes #2821. Plugins that are active and cannot be started emit an admin notice.
-rw-r--r--engine/lib/plugins.php2
-rw-r--r--languages/en.php8
-rw-r--r--views/default/admin/plugins.php3
3 files changed, 7 insertions, 6 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 86070a2aa..fac52b152 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -324,7 +324,7 @@ function elgg_load_plugins() {
$plugin->deactivate();
$msg = elgg_echo('PluginException:CannotStart',
array($plugin->getID(), $plugin->guid, $e->getMessage()));
- register_error($msg);
+ elgg_add_admin_notice('cannot_start' . $plugin->getID(), $msg);
$return = false;
continue;
diff --git a/languages/en.php b/languages/en.php
index 5af005814..6aa292e5a 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -63,7 +63,7 @@ $english = array(
'InvalidClassException:NotValidElggStar' => "GUID:%d is not a valid %s",
'PluginException:MisconfiguredPlugin' => "%s (guid: %s) is a misconfigured plugin. It has been disabled. Please search the Elgg wiki for possible causes (http://docs.elgg.org/wiki/).",
- 'PluginException:CannotStart' => '%s (guid: %s) cannot start. Reason: %s',
+ 'PluginException:CannotStart' => '%s (guid: %s) cannot start and has been deactivated. Reason: %s',
'PluginException:InvalidID' => "%s is an invalid plugin ID.",
'PluginException:InvalidPath' => "%s is an invalid plugin path.",
'PluginException:InvalidManifest' => 'Invalid manifest file for plugin %s',
@@ -79,9 +79,9 @@ $english = array(
'ElggPluginPackage:InvalidPlugin:InvalidProvides' => 'Invalid provides type "%s"',
'ElggPluginPackage:InvalidPlugin:CircularDep' => 'Invalid %s dependency "%s" in plugin %s. Plugins cannot conflict with or require something they provide!',
- 'ElggPlugin:Exception:CannotIncludeFile' => 'Cannot include %s for plugin %s (guid: %s) at %s. Check permissions!',
- 'ElggPlugin:Exception:CannotRegisterViews' => 'Cannot open views dir for plugin %s (guid: %s) at %s. Check permissions!',
- 'ElggPlugin:Exception:CannotRegisterLanguages' => 'Cannot register languages for plugin %s (guid: %s) at %s. Check permissions!',
+ 'ElggPlugin:Exception:CannotIncludeFile' => 'Cannot include %s for plugin %s (guid: %s) at %s.',
+ 'ElggPlugin:Exception:CannotRegisterViews' => 'Cannot open views dir for plugin %s (guid: %s) at %s.',
+ 'ElggPlugin:Exception:CannotRegisterLanguages' => 'Cannot register languages for plugin %s (guid: %s) at %s.',
'ElggPlugin:Exception:NoID' => 'No ID for plugin guid %s!',
'PluginException:ParserError' => 'Error parsing manifest with API version %s in plugin %s.',
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php
index 5bd0dd55d..c3e7e3ab0 100644
--- a/views/default/admin/plugins.php
+++ b/views/default/admin/plugins.php
@@ -22,7 +22,8 @@ foreach ($installed_plugins as $id => $plugin) {
if (!$plugin->isValid()) {
if ($plugin->isActive()) {
// force disable and warn
- register_error(elgg_echo('ElggPlugin:InvalidAndDeactivated', array($plugin->getId())));
+ elgg_add_admin_notice('invalid_and_deactivated_' . $plugin->getID(),
+ elgg_echo('ElggPlugin:InvalidAndDeactivated', array($plugin->getId())));
$plugin->deactivate();
}
continue;