-const char cgi_rcs[] = "$Id: cgi.c,v 1.32 2001/10/14 22:20:18 jongfoster Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.33 2001/10/14 22:28:41 jongfoster Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgi.c,v $
*
* Revisions :
* $Log: cgi.c,v $
+ * Revision 1.33 2001/10/14 22:28:41 jongfoster
+ * Fixing stupid typo.
+ *
* Revision 1.32 2001/10/14 22:20:18 jongfoster
* - Changes to CGI dispatching method to match CGI names exactly,
* rather than doing a prefix match.
struct map *default_exports(const struct client_state *csp, const char *caller)
{
char buf[20];
+ int local_help_exists = 0;
struct map * exports = new_map();
map(exports, "version", 1, VERSION, 1);
map(exports, "my-ip-address", 1, csp->my_ip_addr_str ? csp->my_ip_addr_str : "unknown", 1);
map(exports, "my-hostname", 1, csp->my_hostname ? csp->my_hostname : "unknown", 1);
- map(exports, "admin-address", 1, csp->config->admin_address ? csp->config->admin_address : "fill@me.in.please", 1);
map(exports, "homepage", 1, HOME_PAGE_URL, 1);
map(exports, "default-cgi", 1, HOME_PAGE_URL "/config", 1);
map(exports, "menu", 1, make_menu(caller), 0);
map_block_killer(exports, "unstable");
}
+ if(csp->config->admin_address != NULL)
+ {
+ map(exports, "admin-address", 1, csp->config->admin_address, 1);
+ local_help_exists = 1;
+ }
+ else
+ {
+ map_block_killer(exports, "have-adminaddr-info");
+ }
+
if(csp->config->proxy_info_url != NULL)
{
map(exports, "proxy-info-url", 1, csp->config->proxy_info_url, 1);
+ local_help_exists = 1;
}
else
{
map_block_killer(exports, "have-proxy-info");
- }
+ }
+
+ if (local_help_exists == 0)
+ map_block_killer(exports, "have-help-info");
return (exports);