From bfd3085f782460b3f45f99c48961e974858d2237 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 25 Nov 2012 05:12:13 +0100 Subject: mod_admin_adhoc: Remove unused form --- plugins/mod_admin_adhoc.lua | 9 --------- 1 file changed, 9 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_admin_adhoc.lua b/plugins/mod_admin_adhoc.lua index aa1af3ff..9f3175d0 100644 --- a/plugins/mod_admin_adhoc.lua +++ b/plugins/mod_admin_adhoc.lua @@ -212,15 +212,6 @@ function end_user_session_handler(self, data, state) end end -local end_user_session_layout = dataforms_new{ - title = "Ending a User Session"; - instructions = "Fill out this form to end a user's session."; - - { name = "FORM_TYPE", type = "hidden", value = "http://jabber.org/protocol/admin" }; - { name = "accountjids", type = "jid-multi", label = "The Jabber ID(s) for which to end sessions" }; -}; - - function get_user_password_handler(self, data, state) local get_user_password_layout = dataforms_new{ title = "Getting User's Password"; -- cgit v1.2.3 From d7b707744de72882f42d0b688f9ecfd7f9fe3f12 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 29 Nov 2012 07:15:04 +0500 Subject: mod_http: Fix pattern and slightly improve efficiency and memory usage of wildcard HTTP handlers --- plugins/mod_http.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index f386f870..e73778ae 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -88,10 +88,10 @@ function module.add_host(module) local data = handler; handler = function () return data; end elseif event_name:sub(-2, -1) == "/*" then - local base_path = event_name:match("/(.+)/*$"); + local base_path_len = #event_name:match("(/.+/)%*$")+1; local _handler = handler; handler = function (event) - local path = event.request.path:sub(#base_path+1); + local path = event.request.path:sub(base_path_len); return _handler(event, path); end; end -- cgit v1.2.3