function drush_unused_modules in Unused Modules 6
Same name and namespace in other branches
- 8 unused_modules.drush.inc \drush_unused_modules()
- 7 unused_modules.drush.inc \drush_unused_modules()
Drush command callback.
File
- ./
unused_modules.drush.inc, line 43 - Drush implementation for the unused_modules module.
Code
function drush_unused_modules($type = "projects", $show = "disabled") {
// Print projects.
if ($type == 'projects') {
if ($show == 'all') {
drush_unused_modules_show_projects('all');
}
elseif ($show == 'disabled') {
drush_unused_modules_show_projects('disabled');
}
else {
drush_set_error("unknown 'show' argument " . $show . ". See drush unused-modules --help");
}
}
elseif ($type == 'modules') {
if ($show == 'all') {
drush_print($show);
drush_unused_modules_show_modules('all');
}
elseif ($show == 'disabled') {
drush_unused_modules_show_modules('disabled');
}
else {
drush_set_error("unknown 'show' argument " . $show . ". See drush unused-modules --help");
}
}
else {
drush_set_error("unknown 'type' argument " . $type . ". See drush unused-modules --help");
}
}