Browse Source

Fix symbols output in the webui.

tags/0.9.1
Vsevolod Stakhov 9 years ago
parent
commit
2d31590f04
2 changed files with 6 additions and 3 deletions
  1. 1
    1
      interface
  2. 5
    2
      src/controller.c

+ 1
- 1
interface

Subproject commit f21ffa4ce6e35af6fa6c318971c7a58719b4c524
Subproject commit 766599cad32bc948ee64adb9f32de22ab64b9e6c

+ 5
- 2
src/controller.c View File

GHashTableIter it; GHashTableIter it;
struct rspamd_symbols_group *gr; struct rspamd_symbols_group *gr;
struct rspamd_symbol_def *sym, *cur; struct rspamd_symbol_def *sym, *cur;
ucl_object_t *obj, *top, *sym_obj;
ucl_object_t *obj, *top, *sym_obj, *group_symbols;
gpointer k, v; gpointer k, v;


if (!rspamd_controller_check_password (conn_ent, session, msg, FALSE)) { if (!rspamd_controller_check_password (conn_ent, session, msg, FALSE)) {
/* Iterate through all symbols */ /* Iterate through all symbols */
sym = gr->symbols; sym = gr->symbols;


group_symbols = ucl_object_typed_new (UCL_ARRAY);

LL_FOREACH (sym, cur) { LL_FOREACH (sym, cur) {
sym_obj = ucl_object_typed_new (UCL_OBJECT); sym_obj = ucl_object_typed_new (UCL_OBJECT);


"description", 0, false); "description", 0, false);
} }


ucl_object_insert_key (obj, sym_obj, "rules", 0, false);
ucl_array_append (group_symbols, sym_obj);
} }


ucl_object_insert_key (obj, group_symbols, "rules", 0, false);
ucl_array_append (top, obj); ucl_array_append (top, obj);
} }



Loading…
Cancel
Save