aboutsummaryrefslogtreecommitdiff
path: root/views/default/admin/plugins.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/admin/plugins.php')
-rw-r--r--views/default/admin/plugins.php24
1 files changed, 21 insertions, 3 deletions
diff --git a/views/default/admin/plugins.php b/views/default/admin/plugins.php
index cd0b83c00..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;
@@ -45,6 +46,11 @@ foreach ($installed_plugins as $id => $plugin) {
unset($installed_plugins[$id]);
}
break;
+ case 'nonbundled':
+ if (in_array('bundled', $plugin_categories)) {
+ unset($installed_plugins[$id]);
+ }
+ break;
default:
if (!in_array($show_category, $plugin_categories)) {
unset($installed_plugins[$id]);
@@ -55,7 +61,13 @@ foreach ($installed_plugins as $id => $plugin) {
if (isset($plugin_categories)) {
foreach ($plugin_categories as $category) {
if (!array_key_exists($category, $categories)) {
- $categories[$category] = elgg_echo("admin:plugins:category:$category");
+ // if localization string not defined, fall back to original category string
+ $cat_raw_string = "admin:plugins:category:$category";
+ $cat_display_string = elgg_echo($cat_raw_string);
+ if ($cat_display_string == $cat_raw_string) {
+ $cat_display_string = ucwords($category);
+ }
+ $categories[$category] = $cat_display_string;
}
}
}
@@ -82,7 +94,7 @@ switch ($sort) {
case 'alpha':
$plugin_list = array();
foreach ($installed_plugins as $plugin) {
- $plugin_list[$plugin->getManifest()->getName()] = $plugin;
+ $plugin_list[$plugin->getFriendlyName()] = $plugin;
}
ksort($plugin_list);
break;
@@ -96,10 +108,16 @@ switch ($sort) {
asort($categories);
+// we want bundled/nonbundled pulled to be at the top of the list
+unset($categories['bundled']);
+unset($categories['nonbundled']);
+
$common_categories = array(
'all' => elgg_echo('admin:plugins:category:all'),
'active' => elgg_echo('admin:plugins:category:active'),
'inactive' => elgg_echo('admin:plugins:category:inactive'),
+ 'bundled' => elgg_echo('admin:plugins:category:bundled'),
+ 'nonbundled' => elgg_echo('admin:plugins:category:nonbundled'),
);
$categories = array_merge($common_categories, $categories);