mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Replace %admin_email% in greeting.html.
This commit is contained in:
parent
350a489bd0
commit
bd539b8350
1 changed files with 7 additions and 0 deletions
7
httpd.c
7
httpd.c
|
@ -64,6 +64,13 @@ int server_get_handler(d_char *req, char *q_path,
|
||||||
/* replace %host% */
|
/* replace %host% */
|
||||||
s = xs_replace_i(s, "%host%", xs_dict_get(srv_config, "host"));
|
s = xs_replace_i(s, "%host%", xs_dict_get(srv_config, "host"));
|
||||||
|
|
||||||
|
const char *adm_email = xs_dict_get(srv_config, "admin_email");
|
||||||
|
if (xs_is_null(adm_email) || *adm_email == '\0')
|
||||||
|
adm_email = "the administrator of this instance";
|
||||||
|
|
||||||
|
/* replace %admin_email */
|
||||||
|
s = xs_replace_i(s, "%admin_email%", adm_email);
|
||||||
|
|
||||||
/* does it have a %userlist% mark? */
|
/* does it have a %userlist% mark? */
|
||||||
if (xs_str_in(s, "%userlist%") != -1) {
|
if (xs_str_in(s, "%userlist%") != -1) {
|
||||||
char *host = xs_dict_get(srv_config, "host");
|
char *host = xs_dict_get(srv_config, "host");
|
||||||
|
|
Loading…
Reference in a new issue