Ignore:
Timestamp:
02/27/13 15:12:32 (9 years ago)
Author:
gf
Message:

Revert "webif: Simplify template loading and checking."

This reverts commit r8346. The subdir logic is used to have different
template directories for different paths comming from http request.

For more info see:

http://www.streamboard.tv/wbb2/thread.php?threadid=37378

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module-webif-lib.c

    r8436 r8437  
    387387            char* separator = "/* External CSS */";
    388388            char* oldallocated = allocated;
    389             CSS = tpl_getUnparsedTpl("CSS");
     389            CSS = tpl_getUnparsedTpl("CSS", 1, "");
    390390            int32_t newsize = strlen(CSS) + strlen(separator) + 2;
    391391            if (oldallocated) newsize += strlen(oldallocated) + 1;
     
    404404
    405405    } else {
    406         CSS = tpl_getUnparsedTpl("CSS");
    407         JSCRIPT = tpl_getUnparsedTpl("JSCRIPT");
     406        CSS = tpl_getUnparsedTpl("CSS", 1, "");
     407        JSCRIPT = tpl_getUnparsedTpl("JSCRIPT", 1, "");
    408408#ifdef TOUCH
    409         TOUCH_CSS = tpl_getUnparsedTpl("TOUCH_CSS");
    410         TOUCH_JSCRIPT = tpl_getUnparsedTpl("TOUCH_JSCRIPT");
     409        TOUCH_CSS = tpl_getUnparsedTpl("TOUCH_CSS", 1, "");
     410        TOUCH_JSCRIPT = tpl_getUnparsedTpl("TOUCH_JSCRIPT", 1, "");
    411411        char* res_tpl = !subdir || strcmp(subdir, TOUCH_SUBDIR)
    412412            ? (filen == 1 ? CSS : JSCRIPT)
Note: See TracChangeset for help on using the changeset viewer.