mod_commands: Add 'presence_data' field to 'show channels like xxx' list of fields. This makes anthm's trick mentioned on the mailing list even more handy.

This commit is contained in:
Michael S Collins 2011-09-09 12:09:05 -07:00
parent be4d36e3c6
commit 4872e6fff0
1 changed files with 4 additions and 4 deletions

View File

@ -4020,12 +4020,12 @@ SWITCH_STANDARD_API(show_function)
}
if (strchr(argv[2], '%')) {
sprintf(sql,
"select * from channels where hostname='%s' and uuid like '%s' or name like '%s' or cid_name like '%s' or cid_num like '%s' order by created_epoch",
hostname, argv[2], argv[2], argv[2], argv[2]);
"select * from channels where hostname='%s' and uuid like '%s' or name like '%s' or cid_name like '%s' or cid_num like '%s' or presence_data like '%s' order by created_epoch",
hostname, argv[2], argv[2], argv[2], argv[2], argv[2]);
} else {
sprintf(sql,
"select * from channels where hostname='%s' and uuid like '%%%s%%' or name like '%%%s%%' or cid_name like '%%%s%%' or cid_num like '%%%s%%' order by created_epoch",
hostname, argv[2], argv[2], argv[2], argv[2]);
"select * from channels where hostname='%s' and uuid like '%%%s%%' or name like '%%%s%%' or cid_name like '%%%s%%' or cid_num like '%%%s%%' or presence_data like '%%%s%%' order by created_epoch",
hostname, argv[2], argv[2], argv[2], argv[2], argv[2]);
}