diff options
author | dvs1 | 2025-01-17 15:26:04 +1000 |
---|---|---|
committer | dvs1 | 2025-01-17 15:26:04 +1000 |
commit | a50be38fcc361a3a8b4c55dc4e0c9544bd770593 (patch) | |
tree | 4c082bfdda6b38cb1f9876f664c7b1c056cfc5c7 | |
parent | Lua table sorting sucketh. lol (diff) | |
download | notYetAnotherWiki-a50be38fcc361a3a8b4c55dc4e0c9544bd770593.zip notYetAnotherWiki-a50be38fcc361a3a8b4c55dc4e0c9544bd770593.tar.gz notYetAnotherWiki-a50be38fcc361a3a8b4c55dc4e0c9544bd770593.tar.bz2 notYetAnotherWiki-a50be38fcc361a3a8b4c55dc4e0c9544bd770593.tar.xz |
Fix the logo and icon inheritance.
-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 |