Changeset 5112

Show
Ignore:
Timestamp:
07/23/09 02:41:06 (4 years ago)
Author:
jow
Message:

libs/web: use new parser in non-caching mode

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • luci/trunk/libs/web/luasrc/template.lua

    r5105 r5112  
    3333local coroutine = require "coroutine" 
    3434local nixio = require "nixio", require "nixio.util" 
     35local tparser = require "luci.template.parser" 
    3536 
    3637local tostring, pairs, loadstring = tostring, pairs, loadstring 
     
    207208         
    208209    elseif compiler_mode == "memory" then 
    209         local source 
    210         source, err = fs.readfile(sourcefile) or fs.readfile(sourcefile .. ".htm") 
    211         if source then 
    212             self.template, err = compile(source) 
    213         end 
    214              
     210        self.template, _, err = tparser.parse(sourcefile .. ".htm") 
    215211    end 
    216212