Change. Use only require to load function.

Fix. Remove multiple definition of same function.
This commit is contained in:
Alexey Melnichuk
2015-08-10 12:43:06 +04:00
parent 7e481f20b6
commit a8142f527a
64 changed files with 207 additions and 400 deletions

View File

@@ -6,7 +6,7 @@
require "resources.functions.config";
--connect to the database
dofile(scripts_dir.."/resources/functions/database_handle.lua");
require "resources.functions.database_handle";
dbh = database_handle('system');
--get the variables
@@ -23,7 +23,7 @@
if (not default_voice) then default_voice = 'callie'; end
--settings
dofile(scripts_dir.."/resources/functions/settings.lua");
require "resources.functions.settings";
settings = settings(domain_uuid);
storage_type = "";
storage_path = "";
@@ -57,10 +57,7 @@
end
--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";
--define the on_dtmf call back function
function on_dtmf(s, type, obj, arg)
@@ -103,7 +100,7 @@
end
status = dbh:query(sql, function(row)
--add functions
dofile(scripts_dir.."/resources/functions/base64.lua");
require "resources.functions.base64";
--add the path to filename
file_name = recordings_dir.."/"..file_name_only;
--save the recording to the file system