-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 $
* 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
*
* 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.
*
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 */
}
/* 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;
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;
}
{
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;
}
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;
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);
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);
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);
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);
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);
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);
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);
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;