cgi-bin/tek/class/loona.lua
changeset 199 8b5fc485edf4
parent 198 87a4de7c7457
child 201 d52b05a9fe9c
     1.1 --- a/cgi-bin/tek/class/loona.lua	Fri Oct 05 01:41:59 2007 +0200
     1.2 +++ b/cgi-bin/tek/class/loona.lua	Wed Oct 10 10:37:29 2007 +0200
     1.3 @@ -483,7 +483,8 @@
     1.4  	local f, msg = open(fname2)
     1.5  	assert(f, self:dbmsg("Cannot open file", msg))
     1.6  	local parsed, msg = self:loadhtml(f, "loona:out", fname2)
     1.7 -	assert(parsed, self:dbmsg("Syntax error", msg and msg.text))
     1.8 +	msg = msg and (type(msg) == "string" and msg or msg.txt)
     1.9 +	assert(parsed, self:dbmsg("Syntax error", msg))
    1.10  	return self:runboxed(parsed, nil, unpack(arg))
    1.11  end
    1.12  
    1.13 @@ -635,12 +636,12 @@
    1.14  				local label = self:encodeform(e.label or e.name)
    1.15  				local newpath = path and path .. "/" .. e.name or e.name
    1.16  				local active = (e.name == sub.name)
    1.17 -				render.itembegin(self, level, idx)
    1.18 +				render.itembegin(self, level, idx, label)
    1.19  				render.link(self, level, newpath, label, active, e.action)
    1.20  				if recurse and active then
    1.21  					self:rmenu(level + 1, render, newpath, addnew, recurse)
    1.22  				end
    1.23 -				render.itemend(self)
    1.24 +				render.itemend(self, level, idx, label)
    1.25  			end
    1.26  			render.listend(self)
    1.27  		end