diff options
| -rwxr-xr-x | notYetAnotherWiki.lua | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/notYetAnotherWiki.lua b/notYetAnotherWiki.lua index e6e26a7..839065c 100755 --- a/notYetAnotherWiki.lua +++ b/notYetAnotherWiki.lua | |||
| @@ -206,15 +206,18 @@ for name, file in pairs(Files) do | |||
| 206 | for n, y in ipairs{'favicon', 'logo'} do | 206 | for n, y in ipairs{'favicon', 'logo'} do |
| 207 | local pith = '' | 207 | local pith = '' |
| 208 | if nil ~= metadata[y] then | 208 | if nil ~= metadata[y] then |
| 209 | local pth = '' | 209 | local pth, found = '', false |
| 210 | |||
| 211 | if (nil ~= Subs[''].metadata) and (nil ~= Subs[''].metadata[y]) then pith = '' ; found = true end | ||
| 212 | |||
| 210 | for m, x in ipairs(bits) do | 213 | for m, x in ipairs(bits) do |
| 211 | if '' ~= pth then pth = pth .. '/' end | 214 | if '' ~= pth then pth = pth .. '/' end |
| 212 | pth = pth .. x | 215 | pth = pth .. x |
| 213 | if (nil ~= Subs[pth].metadata) and (nil ~= Subs[pth].metadata[y]) then pith = pth end | 216 | if (nil ~= Subs[pth].metadata) and (nil ~= Subs[pth].metadata[y]) then pith = pth ; found = true end |
| 214 | end | 217 | end |
| 215 | if ('' == pith) and (nil ~= Subs[''].metadata) and (nil ~= Subs[''].metadata[y]) then pith = pth end | 218 | -- if ('' == pith) and (nil ~= Subs[''].metadata) and (nil ~= Subs[''].metadata[y]) then pith = pth end |
| 216 | if '' == pith then metadata[y] = linkFrom(path, pith) .. globalData[y] | 219 | if found then metadata[y] = linkFrom(path, pith) .. metadata[y] |
| 217 | else metadata[y] = linkFrom(path, pith) .. metadata[y] | 220 | else metadata[y] = linkFrom(path, pith) .. globalData[y] |
| 218 | end | 221 | end |
| 219 | end | 222 | end |
| 220 | end | 223 | end |
