]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 23 May 2018 03:12:25 +0000 (04:12 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 23 May 2018 03:12:25 +0000 (04:12 +0100)
lib/lua/nb.lua
www/dbq/dbq.php

index c9e0295a0a3d88482d21fae4cdbb1b356fda9457..7ad9b0ead7f458c81060baa142e10c52ebd9590d 100644 (file)
@@ -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
index 2204d55dd5bf02bb757a37fd6295f3459662174d..a007aec5881437fce94b5887b839d74b81836b3e 100644 (file)
@@ -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();