Skip to content

Commit

Permalink
Cleanup drush_commands_categorize() a little.
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Nov 11, 2015
1 parent 30bfcfa commit 1243ab4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions includes/command.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,17 @@ function drush_get_commands($reset = FALSE) {

/**
* Organize commands into categories. Used by help listing and core-cli.
*
* @param array $commands
* A commands array as per drush_get_commands().
*
* @return array $command_categories
* A categorized associative array of commands.
*/
function drush_commands_categorize($implemented) {
function drush_commands_categorize($commands) {
$command_categories = array();
$category_map = array();
foreach ($implemented as $key => $candidate) {
foreach ($commands as $key => $candidate) {
if ((!array_key_exists('is_alias', $candidate) || !$candidate['is_alias']) && !$candidate['hidden']) {
$category = $candidate['category'];
// If we have decided to remap a category, remap every command
Expand Down

0 comments on commit 1243ab4

Please sign in to comment.