commit bd539b8

default  ·  2023-04-20 16:12:56 +0000 UTC
parent 350a489
Replace %admin_email% in greeting.html.
1 files changed,  +7, -0
+7, -0
 1@@ -64,6 +64,13 @@ int server_get_handler(d_char *req, char *q_path,
 2             /* replace %host% */
 3             s = xs_replace_i(s, "%host%", xs_dict_get(srv_config, "host"));
 4 
 5+            const char *adm_email = xs_dict_get(srv_config, "admin_email");
 6+            if (xs_is_null(adm_email) || *adm_email == '\0')
 7+                adm_email = "the administrator of this instance";
 8+
 9+            /* replace %admin_email */
10+            s = xs_replace_i(s, "%admin_email%", adm_email);
11+
12             /* does it have a %userlist% mark? */
13             if (xs_str_in(s, "%userlist%") != -1) {
14                 char *host = xs_dict_get(srv_config, "host");