Comparison

mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 2634:71ce798c86cc

mod_storage_xmlarchive: Add some spacing to improve readability
author Kim Alvefur <zash@zash.se>
date Tue, 21 Mar 2017 11:17:46 +0100
parent 2633:1330ed88ecd8
child 2663:6e8c3fc48237
comparison
equal deleted inserted replaced
2633:1330ed88ecd8 2634:71ce798c86cc
194 local item = items[i]; 194 local item = items[i];
195 if not item then 195 if not item then
196 module:log("warn", "data[%q][%d] is nil", date, i); 196 module:log("warn", "data[%q][%d] is nil", date, i);
197 break; 197 break;
198 end 198 end
199
199 local i_when, i_with = item.when, item.with; 200 local i_when, i_with = item.when, item.with;
201
200 if type(i_when) == "string" then 202 if type(i_when) == "string" then
201 i_when = dt.parse(i_when); 203 i_when = dt.parse(i_when);
202 end 204 end
203 if type(i_when) ~= "number" then 205 if type(i_when) ~= "number" then
204 module:log("warn", "data[%q][%d].when is invalid", date, i); 206 module:log("warn", "data[%q][%d].when is invalid", date, i);
205 break; 207 break;
206 end 208 end
209
207 if (not q_with or i_with == q_with) 210 if (not q_with or i_with == q_with)
208 and (not q_start or i_when >= q_start) 211 and (not q_start or i_when >= q_start)
209 and (not q_end or i_when <= q_end) then 212 and (not q_end or i_when <= q_end) then
210 count = count + 1; 213 count = count + 1;
211 first_item = i + step; 214 first_item = i + step;