summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 96c41b0)
raw | patch | inline | side by side (parent: 96c41b0)
author | Florian Forster <ff@octo.it> | |
Sun, 20 Jun 2010 19:39:33 +0000 (21:39 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sun, 20 Jun 2010 19:39:33 +0000 (21:39 +0200) |
src/action_list_graphs.c | patch | blob | history | |
src/graph.c | patch | blob | history | |
src/graph_instance.c | patch | blob | history |
index 131a6fb1f3e439fcbde8d0c31673ca0fcb8de3f4..f00c6b3bb919e62c91120a224e673474e9336c0a 100644 (file)
--- a/src/action_list_graphs.c
+++ b/src/action_list_graphs.c
int action_list_graphs (void) /* {{{ */
{
const char *format;
+ const char *search;
+ int status;
gl_update ();
+ search = strtolower_copy (param ("search"));
+
format = param ("format");
if (format == NULL)
format = "html";
if (strcmp ("json", format) == 0)
- return (list_graphs_json (param ("search")));
+ status = list_graphs_json (search);
else
- return (list_graphs_html (param ("search")));
+ status = list_graphs_html (search);
+
+ free (search);
+
+ return (status);
} /* }}} int action_list_graphs */
/* vim: set sw=2 sts=2 et fdm=marker : */
diff --git a/src/graph.c b/src/graph.c
index da4b5ea2a47733fa691d6ba2898cdfc086b22fb2..d314bcc1af2070acf4019f5765922096494a4df5 100644 (file)
--- a/src/graph.c
+++ b/src/graph.c
return (status);
}
+ strtolower (buffer);
+
if (strstr (buffer, term) != NULL)
{
status = inst_foreach (cfg->instances, graph_search_submit, &data);
diff --git a/src/graph_instance.c b/src/graph_instance.c
index 45dcefb2519158b2e9bc1ca488d07617eb104817..73aeb1b08cfc2b27621a6d9b646ff29ddd807f85 100644 (file)
--- a/src/graph_instance.c
+++ b/src/graph_instance.c
return (status);
}
+ strtolower (buffer);
+
/* no match */
if (strstr (buffer, term) == NULL)
continue;