X-Git-Url: https://git.octo.it/?p=collection4.git;a=blobdiff_plain;f=src%2Faction_search_json.c;h=834e07e83f339739198d379438ba3ad2675ea386;hp=0786a8f81c1e7f63bd721544982f66ede3acdd2b;hb=e3fb09073a64cc051c11c4a1bdcec493f937b764;hpb=30478870f2afaf991ee19ab7b4c22d3ddcd7b8cd diff --git a/src/action_search_json.c b/src/action_search_json.c index 0786a8f..834e07e 100644 --- a/src/action_search_json.c +++ b/src/action_search_json.c @@ -1,3 +1,26 @@ +/** + * collection4 - action_search_json.c + * Copyright (C) 2010 Florian octo Forster + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * Authors: + * Florian octo Forster + **/ + #include #include #include @@ -7,6 +30,7 @@ #include "common.h" #include "graph.h" #include "graph_ident.h" +#include "graph_instance.h" #include "graph_list.h" #include "utils_cgi.h" @@ -125,7 +149,7 @@ static int list_graphs_json (const char *term) /* {{{ */ if (term == NULL) gl_instance_get_all (json_print_graph_instance, /* user_data = */ &data); else - gl_search (term, json_print_graph_instance, /* user_data = */ &data); + gl_search_string (term, json_print_graph_instance, /* user_data = */ &data); if (!data.first) json_end_graph (); @@ -140,8 +164,6 @@ int action_search_json (void) /* {{{ */ char *search; int status; - gl_update (); - search = strtolower_copy (param ("q")); status = list_graphs_json (search);