From 366b7c6dc8c6fed1fafabcaa1a78b91a81450eac Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 23 May 2018 04:12:25 +0100 Subject: [PATCH] www/dbq/dbq.php --- lib/lua/nb.lua | 6 +++--- www/dbq/dbq.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/lua/nb.lua b/lib/lua/nb.lua index c9e0295a..7ad9b0ea 100644 --- a/lib/lua/nb.lua +++ b/lib/lua/nb.lua @@ -38,8 +38,8 @@ function nb:ngx_location_tmpl(fheader,ffooter) local file = root .. ngx.var.uri; local path = file:gsub('/[^/]+$','') - if not fheader then fheader = root .. "/header.html" end - if not ffooter then ffooter = root .. "/footer.html" end + if not fheader then fheader = root .. "/header.tmpl.html" end + if not ffooter then ffooter = root .. "/footer.tmpl.html" end local template = require "resty.template" if self.dev then template.caching(false) end @@ -82,7 +82,7 @@ function nb:ngx_location_tmpl(fheader,ffooter) template.markdown = require "resty.hoedown" -- ngx.say('zaza' .. template.markdown.html.flags.table) --content = self:md2html(content) - content = '{(header.html)}{*markdown([[' .. content .. ']], { smartypants = false, table = true })*}{(footer.html)}' + content = '{(header.tmpl.html)}{*markdown([[' .. content .. ']], { smartypants = false, table = true })*}{(footer.tmpl.html)}' -- content = self:md2html(content) ishtml = false elseif string.match(file,'%.md$') then diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 2204d55d..a007aec5 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -258,6 +258,7 @@ class DbQ extends nb { // Write output if ($this->expires and !preg_match('/^(dump|insert|update|replace|rm|vi)$/',$this->params['action'])) $this->page->expires = $this->expires; + #if ($this->is_html and $this->params['format'] != 'html') $this->_nopage = true; if (empty($this->_nopage)) { $this->page->headers_no_cache(); -- 2.47.3