When unrolling to static pages, No longer appends a .html extension if a link
authorTimm S. Mueller <tmueller@neoscientists.org>
Mon, 30 Jun 2008 02:11:03 +0200
changeset 243ae976ed38923
parent 242 cba82ca82420
child 244 3a4291950c9f
When unrolling to static pages, No longer appends a .html extension if a link
already ends in .html
cgi-bin/tek/class/cgi.lua
cgi-bin/tek/class/loona.lua
     1.1 --- a/cgi-bin/tek/class/cgi.lua	Tue Jun 10 10:47:21 2008 +0200
     1.2 +++ b/cgi-bin/tek/class/cgi.lua	Mon Jun 30 02:11:03 2008 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  
     1.5  --
     1.6 ---	tek.class.cgi - tek cgi class
     1.7 +--	tek.class.cgi - tek cgi class (TODO: should be a library really)
     1.8  --	Written by Timm S. Mueller <tmueller at neoscientists.org>
     1.9  --	See copyright notice in COPYRIGHT
    1.10  --
     2.1 --- a/cgi-bin/tek/class/loona.lua	Tue Jun 10 10:47:21 2008 +0200
     2.2 +++ b/cgi-bin/tek/class/loona.lua	Mon Jun 30 02:11:03 2008 +0200
     2.3 @@ -37,7 +37,7 @@
     2.4  -------------------------------------------------------------------------------
     2.5  
     2.6  module("tek.class.loona", tek.class)
     2.7 -_VERSION = "LOona Class 5.2"
     2.8 +_VERSION = "LOona Class 5.3"
     2.9  
    2.10  -------------------------------------------------------------------------------
    2.11  --	Markup:
    2.12 @@ -1746,6 +1746,10 @@
    2.13  				return self.requestdocument .. "/" .. path .. anch
    2.14  			end
    2.15  			path = path == self.config.defname and "index" or path
    2.16 +
    2.17 +			if path:match("%.html$") then
    2.18 +				return "/" .. path:gsub("/", "_") .. anch
    2.19 +			end
    2.20  			return "/" .. path:gsub("/", "_") .. ".html" .. anch
    2.21  		end
    2.22  	end