]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
intl: fix language selection for logout / access denied html pages
authorJaroslav Kysela <perex@perex.cz>
Wed, 24 May 2017 12:04:44 +0000 (14:04 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 24 May 2017 12:04:44 +0000 (14:04 +0200)
src/http.c
src/webui/webui.c

index 0365f3cedd415093f9f7b5151c361df7efb4ea09..4882410a753b4d109286308b73718247b40ccfc4 100644 (file)
@@ -576,7 +576,7 @@ http_error(http_connection_t *hc, int error)
                    error, errtxt, error, errtxt);
 
     if (error == HTTP_STATUS_UNAUTHORIZED) {
-      lang = tvh_gettext_get_lang(hc->hc_access ? hc->hc_access->aa_lang_ui : NULL);
+      lang = hc->hc_access ? hc->hc_access->aa_lang_ui : NULL;
       htsbuf_qprintf(&hc->hc_reply, "<P STYLE=\"text-align: center; margin: 2em\"><A HREF=\"%s/\" STYLE=\"border: 1px solid; border-radius: 4px; padding: .6em\">%s</A></P>",
                      tvheadend_webroot ? tvheadend_webroot : "",
                      tvh_gettext_lang(lang, N_("Default login")));
index e73f2083a8747a209145f98fab1e7ea0a185a1ab..c11f733b342c063631da4300a5b9ae982e7705a4 100644 (file)
@@ -236,7 +236,7 @@ page_logout(http_connection_t *hc, const char *remain, void *opaque)
   if (!http_arg_get(&hc->hc_args, "Authorization"))
     return HTTP_STATUS_UNAUTHORIZED;
 
-  lang = tvh_gettext_get_lang(hc->hc_access ? hc->hc_access->aa_lang_ui : NULL);
+  lang = hc->hc_access ? hc->hc_access->aa_lang_ui : NULL;
   title = tvh_gettext_lang(lang, N_("Logout"));
   htsbuf_qprintf(&hc->hc_reply,
                  "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\r\n"