Mercurial Hosting > luan
comparison lucene/src/luan/modules/lucene/Web_search.luan @ 503:92c3d22745b8
make _ENV optional
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 20 May 2015 23:24:46 -0600 |
parents | 55f9f74f1e55 |
children | 7bc63886d4f2 |
comparison
equal
deleted
inserted
replaced
502:d3183a330ff5 | 503:92c3d22745b8 |
---|---|
6 local Io = require "luan:Io" | 6 local Io = require "luan:Io" |
7 local Http = require "luan:http/Http" | 7 local Http = require "luan:http/Http" |
8 local String = require "luan:String" | 8 local String = require "luan:String" |
9 local Html = require "luan:Html" | 9 local Html = require "luan:Html" |
10 | 10 |
11 local M = {} | |
11 | 12 |
12 local function form() %> | 13 local function form() %> |
13 <html> | 14 <html> |
14 <head> | 15 <head> |
15 <% Html.simply_html_head() %> | 16 <% Html.simply_html_head() %> |
117 tbl[n] = val | 118 tbl[n] = val |
118 return n | 119 return n |
119 end | 120 end |
120 | 121 |
121 | 122 |
122 function of(index) | 123 function M.of(index) |
123 | 124 |
124 return { respond = function() | 125 return { respond = function() |
125 Io.stdout = Http.response.text_writer() | 126 Io.stdout = Http.response.text_writer() |
126 local query_string = Http.request.parameter.query | 127 local query_string = Http.request.parameter.query |
127 if query_string == nil then | 128 if query_string == nil then |
145 result(query,sort,headers,table) | 146 result(query,sort,headers,table) |
146 end ) | 147 end ) |
147 end } | 148 end } |
148 | 149 |
149 end | 150 end |
151 | |
152 return M |