X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=cgiedit.c;h=2766f11583f53d38255c58e57b7fb26687e6bace;hp=6d22a3a18835c8711ed3a7331c2650a0b91e787d;hb=0b2da81ed547251a93b0b9ee9ee4fdec0ebd7a83;hpb=c0fd7f52d17d281decdf78fa14274fbc35699fef diff --git a/cgiedit.c b/cgiedit.c index 6d22a3a1..2766f115 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.18 2002/03/16 14:57:44 jongfoster Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.23 2002/03/24 13:32:41 swa Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -16,7 +16,7 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.18 2002/03/16 14:57:44 jongfoster * Stick to the short names in this file for consistency. * * Copyright : Written by and Copyright (C) 2001 the SourceForge - * IJBSWA team. http://ijbswa.sourceforge.net + * Privoxy team. http://ijbswa.sourceforge.net * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -42,6 +42,22 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.18 2002/03/16 14:57:44 jongfoster * * Revisions : * $Log: cgiedit.c,v $ + * Revision 1.23 2002/03/24 13:32:41 swa + * name change related issues + * + * Revision 1.22 2002/03/24 13:25:43 swa + * name change related issues + * + * Revision 1.21 2002/03/22 18:02:48 jongfoster + * Fixing remote toggle + * + * Revision 1.20 2002/03/16 20:28:34 oes + * Added descriptions to the filters so users will know what they select in the cgi editor + * + * Revision 1.19 2002/03/16 18:38:14 jongfoster + * Stopping stupid or malicious users from breaking the actions + * file using the web-based editor. + * * Revision 1.18 2002/03/16 14:57:44 jongfoster * Full support for enabling/disabling modular filters. * @@ -253,7 +269,7 @@ struct file_line struct editable_file { struct file_line * lines; - const char * filename; /* Full pathname - e.g. "/etc/junkbuster/wibble.action" */ + const char * filename; /* Full pathname - e.g. "/etc/privoxy/wibble.action" */ const char * identifier; /* Filename stub - e.g. "wibble". Use for CGI param. */ /* Pre-encoded with url_encode() for ease of use. */ const char * version_str; /* Last modification time, as a string. For CGI param */ @@ -2436,13 +2452,13 @@ jb_err cgi_edit_actions(struct client_state *csp, } /* FIXME: Incomplete */ - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { return JB_ERR_MEMORY; } if (enlist_unique_header(rsp->headers, "Location", - CGI_PREFIX "edit-actions-list?f=ijb")) + CGI_PREFIX "edit-actions-list?f=default")) { free(rsp->status); rsp->status = NULL; @@ -2935,7 +2951,7 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, filter_name = cur_line->data.action->multi_add[ACTION_MULTI_FILTER]->first; while ((filter_name != NULL) - && (0 != strcmp(filter_group->filtername, filter_name->str))) + && (0 != strcmp(filter_group->name, filter_name->str))) { filter_name = filter_name->next; } @@ -2948,7 +2964,7 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, { filter_name = cur_line->data.action->multi_remove[ACTION_MULTI_FILTER]->first; while ((filter_name != NULL) - && (0 != strcmp(filter_group->filtername, filter_name->str))) + && (0 != strcmp(filter_group->name, filter_name->str))) { filter_name = filter_name->next; } @@ -2971,7 +2987,8 @@ jb_err cgi_edit_actions_for_url(struct client_state *csp, else { if (!err) err = map(line_exports, "index", 1, number, 1); - if (!err) err = map(line_exports, "name", 1, filter_group->filtername, 1); + if (!err) err = map(line_exports, "name", 1, filter_group->name, 1); + if (!err) err = map(line_exports, "description", 1, filter_group->description, 1); if (!err) err = map_radio(line_exports, "this-filter", "ynx", current_mode); this_line = NULL; @@ -3207,7 +3224,7 @@ jb_err cgi_edit_actions_submit(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -3329,7 +3346,7 @@ jb_err cgi_edit_actions_url(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -3468,7 +3485,7 @@ jb_err cgi_edit_actions_add_url(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -3584,7 +3601,7 @@ jb_err cgi_edit_actions_remove_url(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -3716,7 +3733,7 @@ jb_err cgi_edit_actions_section_remove(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -3890,7 +3907,7 @@ jb_err cgi_edit_actions_section_add(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -4089,7 +4106,7 @@ jb_err cgi_edit_actions_section_swap(struct client_state *csp, return JB_ERR_MEMORY; } - rsp->status = strdup("302 Local Redirect from Junkbuster"); + rsp->status = strdup("302 Local Redirect from Privoxy"); if (rsp->status == NULL) { free(target); @@ -4148,17 +4165,17 @@ jb_err cgi_toggle(struct client_state *csp, mode = get_char_param(parameters, "set"); - if (mode == 'e') + if (mode == 'E') { /* Enable */ g_bToggleIJB = 1; } - else if (mode == 'd') + else if (mode == 'D') { /* Disable */ g_bToggleIJB = 0; } - else if (mode == 't') + else if (mode == 'T') { /* Toggle */ g_bToggleIJB = !g_bToggleIJB;