Changeset

2134:bd7744df0b4a

mod_pubsub_feeds: Remove unused imports [luacheck]
author Kim Alvefur <zash@zash.se>
date Sun, 20 Mar 2016 12:38:22 +0100
parents 2133:85762420a2c0
children 2135:42b095dab626
files mod_pubsub_feeds/mod_pubsub_feeds.lua
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Mar 20 12:37:56 2016 +0100
+++ b/mod_pubsub_feeds/mod_pubsub_feeds.lua	Sun Mar 20 12:38:22 2016 +0100
@@ -44,8 +44,6 @@
 local http = require "net.http";
 local formdecode = http.formdecode;
 local formencode = http.formencode;
-local urldecode  = http.urldecode;
-local urlencode  = http.urlencode;
 
 local feed_list = module:shared("feed_list");
 local refresh_interval;
@@ -156,7 +154,7 @@
 
 function refresh_feeds(now)
 	--module:log("debug", "Refreshing feeds");
-	for node, item in pairs(feed_list) do
+	for _, item in pairs(feed_list) do
 		if item.subscription ~= "subscribe" and item.last_update + refresh_interval < now then
 			--module:log("debug", "checking %s", item.node);
 			fetch(item, update_entry);
@@ -166,7 +164,7 @@
 end
 
 local function format_url(node)
-	return module:http_url(nil, "/callback") .. "?node=" .. urlencode(node);
+	return module:http_url(nil, "/callback") .. "?" .. formencode({ node = node });
 end
 
 function subscribe(feed, want)