sorting commands by status and name
git-svn-id: https://beef.googlecode.com/svn/trunk@1364 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -478,13 +478,11 @@ class Modules < BeEF::Extension::AdminUI::HttpController
|
||||
# sort the parent array nodes
|
||||
tree.sort! {|a,b| a['text'] <=> b['text']}
|
||||
|
||||
# sort the children nodes by status
|
||||
# sort the children nodes by status and name
|
||||
tree.each {|x| x['children'] =
|
||||
x['children'].sort_by {|a| a['status']}
|
||||
x['children'].sort_by {|a| [a['status'],a['text']]}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# append the number of command modules so the branch name results in: "<category name> (num)"
|
||||
tree.each {|command_module_branch|
|
||||
num_of_command_modules = command_module_branch['children'].length
|
||||
|
||||
Reference in New Issue
Block a user