fix show module as json

This commit is contained in:
Seven Du 2013-04-22 23:10:17 +08:00
parent 4e7801905b
commit 03892b5556
1 changed files with 7 additions and 7 deletions

View File

@ -4598,7 +4598,7 @@ SWITCH_STANDARD_API(show_function)
}
sprintf(sql, "select type, name, ikey from interfaces where hostname='%s' and type = '%s' order by type,name", hostname, command);
} else if (!strncasecmp(command, "module", 6)) {
if (argv[1]) {
if (argv[1] && strcasecmp(argv[1], "as")) {
sprintf(sql, "select distinct type, name, ikey, filename from interfaces where hostname='%s' and ikey = '%s' order by type,name",
hostname, argv[1]);
} else {