mod_pastebin: Have a default pastebin URL.
authorWaqas Hussain <waqas20@gmail.com>
Tue, 21 Aug 2012 23:37:53 +0500
changeset 802 4e43becc3bbe
parent 801 133ee88d19ae
child 803 be509416d64c
mod_pastebin: Have a default pastebin URL.
mod_pastebin/mod_pastebin.lua
--- 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);