Mercurial > prosody-modules
comparison mod_storage_xmlarchive/mod_storage_xmlarchive.lua @ 3453:41e1cacf3c4e
mod_storage_xmlarchive: Don't return early when looking through entire archive
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 21 Jan 2019 19:52:04 +0100 |
parents | 0c539092aa75 |
children | d73ed7975d82 |
comparison
equal
deleted
inserted
replaced
3452:0c539092aa75 | 3453:41e1cacf3c4e |
---|---|
67 for i = 1, #items do | 67 for i = 1, #items do |
68 if items[i].id == id then | 68 if items[i].id == id then |
69 return d, i, items; | 69 return d, i, items; |
70 end | 70 end |
71 end | 71 end |
72 return; -- Assuming no duplicates | 72 if date then |
73 return; -- Assuming no duplicates | |
74 end | |
73 elseif date and date < dates[d] then | 75 elseif date and date < dates[d] then |
74 return; -- List is assumed to be sorted | 76 return; -- List is assumed to be sorted |
75 end | 77 end |
76 end | 78 end |
77 end | 79 end |