mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Change. Use only require to load function.
Fix. Remove multiple definition of same function.
This commit is contained in:
@@ -27,19 +27,11 @@ digit_timeout = 5000;
|
||||
max_retries = 3;
|
||||
tries = 0;
|
||||
|
||||
function trim (s)
|
||||
return (string.gsub(s, "^%s*(.-)%s*$", "%1"))
|
||||
end
|
||||
--define the trim function
|
||||
require "resources.functions.trim";
|
||||
|
||||
function explode ( seperator, str )
|
||||
local pos, arr = 0, {}
|
||||
for st, sp in function() return string.find( str, seperator, pos, true ) end do -- for each divider found
|
||||
table.insert( arr, string.sub( str, pos, st-1 ) ) -- attach chars left of current divider
|
||||
pos = sp + 1 -- jump past current divider
|
||||
end
|
||||
table.insert( arr, string.sub( str, pos ) ) -- attach chars right of last divider
|
||||
return arr
|
||||
end
|
||||
--define the explode function
|
||||
require "resources.functions.explode";
|
||||
|
||||
function check_pin_number()
|
||||
--sleep
|
||||
|
||||
Reference in New Issue
Block a user