diff options
| author | 2023-04-20 18:12:56 +0200 | |
|---|---|---|
| committer | 2023-04-20 18:12:56 +0200 | |
| commit | bd539b8350d91c1efb42a0269f41bff5b2d99110 (patch) | |
| tree | 2303df0b6e2d84bfbb0f91b37e9a18d8dcc89512 | |
| parent | Deleted debug code. (diff) | |
| download | snac2-bd539b8350d91c1efb42a0269f41bff5b2d99110.tar.gz snac2-bd539b8350d91c1efb42a0269f41bff5b2d99110.tar.xz snac2-bd539b8350d91c1efb42a0269f41bff5b2d99110.zip | |
Replace %admin_email% in greeting.html.
| -rw-r--r-- | httpd.c | 7 |
1 files changed, 7 insertions, 0 deletions
| @@ -64,6 +64,13 @@ int server_get_handler(d_char *req, char *q_path, | |||
| 64 | /* replace %host% */ | 64 | /* replace %host% */ |
| 65 | s = xs_replace_i(s, "%host%", xs_dict_get(srv_config, "host")); | 65 | s = xs_replace_i(s, "%host%", xs_dict_get(srv_config, "host")); |
| 66 | 66 | ||
| 67 | const char *adm_email = xs_dict_get(srv_config, "admin_email"); | ||
| 68 | if (xs_is_null(adm_email) || *adm_email == '\0') | ||
| 69 | adm_email = "the administrator of this instance"; | ||
| 70 | |||
| 71 | /* replace %admin_email */ | ||
| 72 | s = xs_replace_i(s, "%admin_email%", adm_email); | ||
| 73 | |||
| 67 | /* does it have a %userlist% mark? */ | 74 | /* does it have a %userlist% mark? */ |
| 68 | if (xs_str_in(s, "%userlist%") != -1) { | 75 | if (xs_str_in(s, "%userlist%") != -1) { |
| 69 | char *host = xs_dict_get(srv_config, "host"); | 76 | char *host = xs_dict_get(srv_config, "host"); |