diff mod_pastebin/mod_pastebin.lua @ 802:4e43becc3bbe

mod_pastebin: Have a default pastebin URL.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 21 Aug 2012 23:37:53 +0500
parents 7e444de959bb
children 6c2b77f97e62
line wrap: on
line diff
--- a/mod_pastebin/mod_pastebin.lua	Fri Aug 17 17:23:52 2012 +0200
+++ b/mod_pastebin/mod_pastebin.lua	Tue Aug 21 23:37:53 2012 +0500
@@ -30,7 +30,7 @@
 local max_summary_length = module:get_option_number("pastebin_summary_length", 150);
 local html_preview = module:get_option_boolean("pastebin_html_preview", true);
 
-local base_url = module:get_option_string("pastebin_url");
+local base_url = module:get_option_string("pastebin_url", module:http_url());
 
 -- Seconds a paste should live for in seconds (config is in hours), default 24 hours
 local expire_after = math.floor(module:get_option_number("pastebin_expire_after", 24) * 3600);