Mercurial > prosody-modules
changeset 1552:81b3599c02fb
mod_http_muc_log: Have URL of date list page end with a slash
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Nov 2014 08:32:43 +0100 (2014-11-09) |
parents | 5127f4db9d39 |
children | 1398d2bbcd42 |
files | mod_http_muc_log/mod_http_muc_log.lua |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua Sat Nov 08 16:41:31 2014 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Sun Nov 09 08:32:43 2014 +0100 @@ -93,7 +93,7 @@ body = [[ <nav> <a class="prev" href="{prev}">←</a> -<a class="up" href="../{room}">↑</a> +<a class="up" href=".">↑</a> <a class="next" href="{next}">→</a> </nav> <ul> @@ -127,7 +127,7 @@ }); local room_item_template = template[[ -<dt><a href="{room}">{name}</a></dt> +<dt><a href="{room}/">{name}</a></dt> <dd>{description?}</dd> ]]; @@ -139,10 +139,10 @@ end -- FIXME Invent some more efficient API for this -local function dates_page(event, room) +local function dates_page(event, path) local request, response = event.request, event.response; - room = nodeprep(room); + local room = nodeprep(path:match("^(.*)/$")); if not room or not public_room(room) then return end local dates, i = {}, 1;