Comparison

core/moduleapi.lua @ 7141:362545c3f8bb

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Feb 2016 00:04:11 +0000
parent 7116:ecba5fee4867
parent 7127:27557dd7b460
child 7142:67226eaef97c
comparison
equal deleted inserted replaced
7126:de3659191e90 7141:362545c3f8bb
301 end 301 end
302 value:include(global_value); 302 value:include(global_value);
303 return value; 303 return value;
304 end 304 end
305 305
306 function api:get_option_path(name, default, parent)
307 if parent == nil then
308 parent = parent or self:get_directory();
309 elseif prosody.paths[parent] then
310 parent = prosody.paths[parent];
311 end
312 local value = self:get_option_string(name, default);
313 if value == nil then
314 return nil;
315 end
316 return resolve_relative_path(parent, value);
317 end
318
319
306 function api:context(host) 320 function api:context(host)
307 return setmetatable({host=host or "*"}, {__index=self,__newindex=self}); 321 return setmetatable({host=host or "*"}, {__index=self,__newindex=self});
308 end 322 end
309 323
310 function api:add_item(key, value) 324 function api:add_item(key, value)