From: Adam Sutton Date: Tue, 8 Jan 2013 13:30:11 +0000 (+0000) Subject: [PR-210] some tidying up of the webui debug option. X-Git-Tag: v3.5~174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddcee0e750a6564adec9c95b66a72fad7a070dc3;p=thirdparty%2Ftvheadend.git [PR-210] some tidying up of the webui debug option. --- diff --git a/src/webui/extjs.c b/src/webui/extjs.c index 7291e66b9..f1bd1e475 100644 --- a/src/webui/extjs.c +++ b/src/webui/extjs.c @@ -86,34 +86,19 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque) htsbuf_queue_t *hq = &hc->hc_reply; #define EXTJSPATH "static/extjs" - htsbuf_qprintf(hq, "\n"); - if(webui_debug) { - htsbuf_qprintf(hq, "\n" - "\n" - "\n"); - tvhlog(LOG_INFO, "webui", "Running web interface in debug mode"); - } - else { - htsbuf_qprintf(hq, "\n" - "\n" - "\n"); - } - - htsbuf_qprintf(hq, "\n" + htsbuf_qprintf(hq, "\n" + "\n" + "\n" + "\n" "\n" - "\n"); - - extjs_exec(hq, "Ext.BLANK_IMAGE_URL = " - "'"EXTJSPATH"/resources/images/default/s.gif';"); - -#if 0 - htsbuf_qprintf(hq, - ""); -#endif - + "\n", + webui_debug ? "-debug" : "", + webui_debug ? "-debug" : "", + webui_debug ? "" : "-min"); + + extjs_exec(hq, "Ext.BLANK_IMAGE_URL = " "'"EXTJSPATH"/resources/images/default/s.gif';"); /** * Load extjs extensions diff --git a/src/webui/webui.c b/src/webui/webui.c index 69ccadf0e..90ffc6f45 100644 --- a/src/webui/webui.c +++ b/src/webui/webui.c @@ -939,6 +939,9 @@ int page_statedump(http_connection_t *hc, const char *remain, void *opaque); void webui_init(void) { + if (webui_debug) + tvhlog(LOG_INFO, "webui", "Running web interface in debug mode"); + http_path_add("", NULL, page_root2, ACCESS_WEB_INTERFACE); http_path_add("/", NULL, page_root, ACCESS_WEB_INTERFACE);