| 245 | } |
| 246 | |
| 247 | static int mod_info_module_cmds(request_rec * r, const command_rec * cmds, |
| 248 | ap_directive_t * node, int from, int level) |
| 249 | { |
| 250 | int shown = from; |
| 251 | ap_directive_t *dir; |
| 252 | if (level == 0) |
| 253 | set_fn_info(r, NULL); |
| 254 | for (dir = node; dir; dir = dir->next) { |
| 255 | if (dir->first_child != NULL) { |
| 256 | if (level < mod_info_module_cmds(r, cmds, dir->first_child, |
| 257 | shown, level + 1)) { |
| 258 | shown = level; |
| 259 | mod_info_show_close(r, dir, level); |
| 260 | } |
| 261 | } |
| 262 | else if (mod_info_has_cmd(cmds, dir)) { |
| 263 | if (shown < level) { |
| 264 | mod_info_show_parents(r, dir->parent, shown, level - 1); |
| 265 | shown = level; |
| 266 | } |
| 267 | mod_info_show_cmd(r, dir, level); |
| 268 | } |
| 269 | } |
| 270 | return shown; |
| 271 | } |
| 272 | |
| 273 | typedef struct |
| 274 | { /*XXX: should get something from apr_hooks.h instead */ |
no test coverage detected