From: oes Date: Thu, 3 Apr 2003 13:50:58 +0000 (+0000) Subject: - Don't call cgi_error_disabled ifndef FEATURE_CGI_EDIT_ACTIONS X-Git-Tag: v_3_0_3~126 X-Git-Url: http://www.privoxy.org/gitweb/@user-manual@?a=commitdiff_plain;h=6bac9a4f7f96be73dcfa879bed4c0ddb295dc93f;p=privoxy.git - Don't call cgi_error_disabled ifndef FEATURE_CGI_EDIT_ACTIONS (fixes bug #710056) - Show toggle info only if we have it --- diff --git a/cgi.c b/cgi.c index 332b0b27..e0ff8768 100644 --- a/cgi.c +++ b/cgi.c @@ -1,4 +1,4 @@ -const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.5 2003/03/11 11:53:58 oes Exp $"; +const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.6 2003/03/12 01:26:25 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/Attic/cgi.c,v $ @@ -38,6 +38,10 @@ const char cgi_rcs[] = "$Id: cgi.c,v 1.70.2.5 2003/03/11 11:53:58 oes Exp $"; * * Revisions : * $Log: cgi.c,v $ + * Revision 1.70.2.6 2003/03/12 01:26:25 david__schmidt + * Move declaration of struct tm dummy outside of a control block so it is + * accessible later on during snprintf in get_http_time. + * * Revision 1.70.2.5 2003/03/11 11:53:58 oes * Cosmetic: Renamed cryptic variable * @@ -467,7 +471,11 @@ static const struct cgi_dispatcher cgi_dispatchers[] = { #endif { "show-status", cgi_show_status, +#ifdef FEATURE_CGI_EDIT_ACTIONS "View & change the current configuration", +#else + "View the current configuration", +#endif TRUE }, { "show-version", cgi_show_version, @@ -843,7 +851,7 @@ static struct http_response *dispatch_known_cgi(struct client_state * csp, } else { - err = cgi_error_disabled(csp, rsp); + err = cgi_error_404(csp, rsp, param_list); } } @@ -2058,6 +2066,8 @@ struct map *default_exports(const struct client_state *csp, const char *caller) if (!err) err = map(exports, "actions-help-prefix", 1, ACTIONS_HELP_PREFIX ,1); #ifdef FEATURE_TOGGLE if (!err) err = map_conditional(exports, "enabled-display", global_toggle_state); +#else + if (!err) err = map_block_killer(exports, "can-toggle"); #endif snprintf(buf, 20, "%d", csp->config->hport);