mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 03:33:49 +00:00
Change. Use only require to load function.
Fix. Remove multiple definition of same function.
This commit is contained in:
@@ -31,16 +31,11 @@
|
||||
local file = assert(io.open(tmp_file, "w"));
|
||||
file:write("remove this file to stop the script");
|
||||
|
||||
--add the trim function
|
||||
function trim(s)
|
||||
return s:gsub("^%s+", ""):gsub("%s+$", "")
|
||||
end
|
||||
--define the trim function
|
||||
require "resources.functions.trim"
|
||||
|
||||
--check if a file exists
|
||||
function file_exists(name)
|
||||
local f=io.open(name,"r")
|
||||
if f~=nil then io.close(f) return true else return false end
|
||||
end
|
||||
require "resources.functions.file_exists"
|
||||
|
||||
--create the api object
|
||||
api = freeswitch.API();
|
||||
|
||||
Reference in New Issue
Block a user