aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/plugins/activate.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-02 11:18:55 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-02 11:18:55 -0700
commit58b66643c1921706d764b2bb1ea4729519ca31f8 (patch)
tree1154a0ecf822ba81f2751cfe805024d943d032f6 /actions/admin/plugins/activate.php
parentdd55b4b87cb1c89ceeb45ccf49ce648339a86041 (diff)
downloadelgg-58b66643c1921706d764b2bb1ea4729519ca31f8.tar.gz
elgg-58b66643c1921706d764b2bb1ea4729519ca31f8.tar.bz2
Fixes #3915. Added ElggPlugin->getFriendlyName() to check for manifest->getName() first, then for plugin ID. Added better descriptions for plugin activation errors.
Diffstat (limited to 'actions/admin/plugins/activate.php')
-rw-r--r--actions/admin/plugins/activate.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/actions/admin/plugins/activate.php b/actions/admin/plugins/activate.php
index 0049878e3..224b5a2ae 100644
--- a/actions/admin/plugins/activate.php
+++ b/actions/admin/plugins/activate.php
@@ -29,7 +29,9 @@ foreach ($plugin_guids as $guid) {
if ($plugin->activate()) {
$activated_guids[] = $guid;
} else {
- register_error(elgg_echo('admin:plugins:activate:no', array($plugin->getManifest()->getName())));
+ $msg = $plugin->getError();
+ $string = ($msg) ? 'admin:plugins:activate:no_with_msg' : 'admin:plugins:activate:no';
+ register_error(elgg_echo($string, array($plugin->getFriendlyName(), $plugin->getError())));
}
}