Comparison

mod_pubsub_feeds/mod_pubsub_feeds.lua @ 2381:a4614a329bdd

mod_pubsub_feeds: Get entry from list of entries (thanks Link Mauve)
author Kim Alvefur <zash@zash.se>
date Sat, 19 Nov 2016 19:17:49 +0100
parent 2380:2f083426fe98
child 2382:f159ad7ac18a
comparison
equal deleted inserted replaced
2380:2f083426fe98 2381:a4614a329bdd
82 local entries = {}; 82 local entries = {};
83 for entry in feed:childtags("entry") do 83 for entry in feed:childtags("entry") do
84 table.insert(entries, entry); 84 table.insert(entries, entry);
85 end 85 end
86 for i = #entries, 1, -1 do -- Feeds are usually in reverse order 86 for i = #entries, 1, -1 do -- Feeds are usually in reverse order
87 local entry = feed[i]; 87 local entry = entries[i];
88 entry.attr.xmlns = xmlns_atom; 88 entry.attr.xmlns = xmlns_atom;
89 89
90 local e_published = entry:get_child_text("published"); 90 local e_published = entry:get_child_text("published");
91 e_published = e_published and dt_parse(e_published); 91 e_published = e_published and dt_parse(e_published);
92 local e_updated = entry:get_child_text("updated"); 92 local e_updated = entry:get_child_text("updated");