Mercurial > prosody-modules
comparison mod_muc_log_http/muc_log_http/mod_muc_log_http.lua @ 118:7eadcf0a0190
mod_muc_log_http: gsub return not only the string in cases the pattern is not found.
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Fri, 15 Jan 2010 09:12:55 +0100 |
parents | ecf05eb2d833 |
children | e6592d8305cb |
comparison
equal
deleted
inserted
replaced
117:ecf05eb2d833 | 118:7eadcf0a0190 |
---|---|
583 nextDay = html.day.dayLink:gsub("###DAY###", nextDay):gsub("###TEXT###", "next day >>") | 583 nextDay = html.day.dayLink:gsub("###DAY###", nextDay):gsub("###TEXT###", "next day >>") |
584 end | 584 end |
585 if previousDay then | 585 if previousDay then |
586 previousDay = html.day.dayLink:gsub("###DAY###", previousDay):gsub("###TEXT###", "<< previous day"); | 586 previousDay = html.day.dayLink:gsub("###DAY###", previousDay):gsub("###TEXT###", "<< previous day"); |
587 end | 587 end |
588 tmp = html.day.body:gsub("###DAY_STUFF###", ret:gsub("%%", "%%%%")):gsub("###JID###", bareRoomJid); | 588 ret = ret:gsub("%%", "%%%%"); |
589 tmp = html.day.body:gsub("###DAY_STUFF###", ret):gsub("###JID###", bareRoomJid); | |
589 tmp = tmp:gsub("###YEAR###", year):gsub("###MONTH###", month):gsub("###DAY###", day); | 590 tmp = tmp:gsub("###YEAR###", year):gsub("###MONTH###", month):gsub("###DAY###", day); |
590 tmp = tmp:gsub("###TITLE_STUFF###", html.day.title:gsub("###TITLE###", roomSubject)); | 591 tmp = tmp:gsub("###TITLE_STUFF###", html.day.title:gsub("###TITLE###", roomSubject)); |
591 tmp = tmp:gsub("###STATUS_CHECKED###", config.showStatus and "checked='checked'" or ""); | 592 tmp = tmp:gsub("###STATUS_CHECKED###", config.showStatus and "checked='checked'" or ""); |
592 tmp = tmp:gsub("###JOIN_CHECKED###", config.showJoin and "checked='checked'" or ""); | 593 tmp = tmp:gsub("###JOIN_CHECKED###", config.showJoin and "checked='checked'" or ""); |
593 tmp = tmp:gsub("###NEXT_LINK###", nextDay or ""); | 594 tmp = tmp:gsub("###NEXT_LINK###", nextDay or ""); |