diff options
author | Sem <sembrestels@riseup.net> | 2011-11-18 07:32:27 +0100 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2011-11-18 07:32:27 +0100 |
commit | e53d410129701ea1c9d19529afa493f11b5f5b70 (patch) | |
tree | d9963b24bf8932654b4a47e36602c75975e50dba /views/default/admin/plugins.php | |
parent | 377da25d2965c64941f83baae119fc970ec60982 (diff) | |
parent | 08a962c98e2923724f8013d6eaae89101243752a (diff) | |
download | elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.gz elgg-e53d410129701ea1c9d19529afa493f11b5f5b70.tar.bz2 |
Merge github.com:Elgg/Elgg
Conflicts:
engine/lib/input.php
Diffstat (limited to 'views/default/admin/plugins.php')
-rw-r--r-- | views/default/admin/plugins.php | 24 |
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); |