mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-31 01:23:50 +00:00
Update follow_me.lua (#4491)
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
local dbh = Database.new('system');
|
||||
|
||||
--determine whether to update the dial string
|
||||
local sql = "select extension, number_alias, accountcode, follow_me_uuid ";
|
||||
local sql = "select extension, number_alias, accountcode, follow_me_uuid, follow_me_enabled ";
|
||||
sql = sql .. "from v_extensions ";
|
||||
sql = sql .. "where domain_uuid = :domain_uuid ";
|
||||
sql = sql .. "and extension_uuid = :extension_uuid ";
|
||||
@@ -80,6 +80,7 @@
|
||||
local number_alias = row.number_alias or '';
|
||||
local accountcode = row.accountcode;
|
||||
local follow_me_uuid = row.follow_me_uuid;
|
||||
local enabled = row.follow_me_enabled;
|
||||
|
||||
--determine whether to update the dial string
|
||||
sql = "select follow_me_enabled, cid_name_prefix, cid_number_prefix, dial_string "
|
||||
@@ -94,7 +95,7 @@
|
||||
row = dbh:first_row(sql, params)
|
||||
if not row then return end
|
||||
|
||||
local enabled = row.follow_me_enabled;
|
||||
--local enabled = row.follow_me_enabled;
|
||||
local cid_name_prefix = row.cid_name_prefix;
|
||||
local cid_number_prefix = row.cid_number_prefix;
|
||||
local dial_string = row.dial_string;
|
||||
@@ -122,7 +123,7 @@
|
||||
end
|
||||
|
||||
--enable or disable follow me
|
||||
sql = "update v_follow_me set ";
|
||||
sql = "update v_extensions set ";
|
||||
if (enabled == "true") then
|
||||
sql = sql .. "follow_me_enabled = 'false' ";
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user