- Don't call cgi_error_disabled ifndef FEATURE_CGI_EDIT_ACTIONS
authoroes <oes@users.sourceforge.net>
Thu, 3 Apr 2003 13:50:58 +0000 (13:50 +0000)
committeroes <oes@users.sourceforge.net>
Thu, 3 Apr 2003 13:50:58 +0000 (13:50 +0000)
  (fixes bug #710056)
- Show toggle info only if we have it

cgi.c

diff --git a/cgi.c b/cgi.c
index 332b0b2..e0ff876 100644 (file)
--- 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);