comparison mod_export_skeletons/mod_export_skeletons.lua @ 4820:5704082b8703

mod_export_skeletons: Fix logic to do wildcard search It passed false when it should have passed true for "*"
author Kim Alvefur <zash@zash.se>
date Fri, 10 Dec 2021 14:19:10 +0100
parents d66162e850cd
children 17fbe82d4bfe
comparison
equal deleted inserted replaced
4819:b1882a40c246 4820:5704082b8703
51 um.initialize_host(host); 51 um.initialize_host(host);
52 host_initialized[host] = true; 52 host_initialized[host] = true;
53 end 53 end
54 54
55 local archive = module:context(host):open_store(store, "archive"); 55 local archive = module:context(host):open_store(store, "archive");
56 local iter, total = assert(archive:find(username ~= "*" and username, query)) 56 local iter, total = assert(archive:find(username == "*" or username, query))
57 if total then io.stderr:write(string.format("Processing %d entries\n", total)); end 57 if total then io.stderr:write(string.format("Processing %d entries\n", total)); end
58 for _, item in iter do 58 for _, item in iter do
59 local clean = skeleton(item); 59 local clean = skeleton(item);
60 60
61 -- Normalize top level attributes 61 -- Normalize top level attributes