share/collection.js: Keep visibility when redrawing graphs.
[collection4.git] / src / action_search_json.c
index 1b75f43..834e07e 100644 (file)
@@ -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 <ff at octo.it>
+ **/
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -126,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 ();
@@ -141,8 +164,6 @@ int action_search_json (void) /* {{{ */
   char *search;
   int status;
 
-  gl_update ();
-
   search = strtolower_copy (param ("q"));
 
   status = list_graphs_json (search);