From: Jaroslav Kysela Date: Wed, 24 May 2017 12:04:44 +0000 (+0200) Subject: intl: fix language selection for logout / access denied html pages X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b47d9bf390b5951425cc0695283bdd1db26f4bc9;p=thirdparty%2Ftvheadend.git intl: fix language selection for logout / access denied html pages --- diff --git a/src/http.c b/src/http.c index 0365f3ced..4882410a7 100644 --- a/src/http.c +++ b/src/http.c @@ -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, "

%s

", tvheadend_webroot ? tvheadend_webroot : "", tvh_gettext_lang(lang, N_("Default login"))); diff --git a/src/webui/webui.c b/src/webui/webui.c index e73f2083a..c11f733b3 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -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, "\r\n"