mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-07 12:13:49 +00:00
Replace system with api:executeString
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
end
|
||||
|
||||
--include before
|
||||
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/before /b -1"));
|
||||
result = assert (api:executeString("dir " ..scripts_dir.."/app/dialplan/resources/before /b -1"));
|
||||
for file in result:lines() do
|
||||
if (string.sub(file, -4) == ".lua") then
|
||||
if file_exists(scripts_dir.."/app/dialplan/resources/before/"..file) then
|
||||
@@ -85,7 +85,7 @@
|
||||
end
|
||||
|
||||
--include the dialplans
|
||||
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/"..dialplan_dir.." /b -1"));
|
||||
result = assert (api:executeString("dir " ..scripts_dir.."/app/dialplan/resources/"..dialplan_dir.." /b -1"));
|
||||
for file in result:lines() do
|
||||
if (string.sub(file, -4) == ".lua") then
|
||||
if file_exists(scripts_dir.."/app/dialplan/resources/"..dialplan_dir.."/"..file) then
|
||||
@@ -96,7 +96,7 @@
|
||||
end
|
||||
|
||||
--include after
|
||||
result = assert (system("dir " ..scripts_dir.."/app/dialplan/resources/after /b -1"));
|
||||
result = assert (api:executeString("dir " ..scripts_dir.."/app/dialplan/resources/after /b -1"));
|
||||
for file in result:lines() do
|
||||
if (string.sub(file, -4) == ".lua") then
|
||||
if file_exists(scripts_dir.."/app/dialplan/resources/after/"..file) then
|
||||
|
||||
Reference in New Issue
Block a user