Add list_contains_item().
[privoxy.git] / cgisimple.c
index d1e06cb..3e32295 100644 (file)
@@ -1,4 +1,4 @@
-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.52 2007/02/13 15:10:26 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.54 2007/04/09 18:11:35 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
@@ -36,6 +36,14 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.52 2007/02/13 15:10:26 fabian
  *
  * Revisions   :
  *    $Log: cgisimple.c,v $
+ *    Revision 1.54  2007/04/09 18:11:35  fabiankeil
+ *    Don't mistake VC++'s _snprintf() for a snprintf() replacement.
+ *
+ *    Revision 1.53  2007/04/08 13:21:04  fabiankeil
+ *    Reference action files in CGI URLs by id instead
+ *    of using the first part of the file name.
+ *    Fixes BR 1694250 and BR 1590556.
+ *
  *    Revision 1.52  2007/02/13 15:10:26  fabiankeil
  *    Apparently fopen()ing in "binary" mode doesn't require
  *    #ifdefs, it's already done without them in cgiedit.c.
@@ -304,10 +312,6 @@ const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.52 2007/02/13 15:10:26 fabian
 #include <unistd.h>
 #endif /* def HAVE_ACCESS */
 
-#ifdef _WIN32
-#define snprintf _snprintf
-#endif /* def _WIN32 */
-
 #include "project.h"
 #include "cgi.h"
 #include "cgisimple.h"
@@ -1510,9 +1514,9 @@ jb_err cgi_show_url_info(struct client_state *csp,
                string_append(&matches, buf);
                string_append(&matches, "View</a>");
 #ifdef FEATURE_CGI_EDIT_ACTIONS
-               string_append(&matches, " <a class=\"cmd\" href=\"/edit-actions-list?f=");
-               string_join  (&matches, html_encode(csp->config->actions_file_short[i]));
-               string_append(&matches, "\">Edit</a>");
+               snprintf(buf, sizeof(buf), " <a class=\"cmd\" href=\"/edit-actions-list?f=%d\">", i);
+               string_append(&matches, buf);
+               string_append(&matches, "Edit</a>");
 #endif
                string_append(&matches, "</th></tr>\n");