Fix a white space and a empty uuid

This commit is contained in:
Mark Crane 2014-08-29 08:33:15 +00:00
parent 2accf75870
commit 3d131cc514
1 changed files with 22 additions and 21 deletions

View File

@ -123,15 +123,17 @@
end end
--disable follow me --disable follow me
if (enabled == "true" and follow_me_uuid ~= nil) then if (follow_me_uuid ~= nil) then
sql = "update v_follow_me set "; if (enabled == "true") then
sql = sql .. "follow_me_enabled = 'false' "; sql = "update v_follow_me set ";
sql = sql .. "where domain_uuid = '"..domain_uuid.."' "; sql = sql .. "follow_me_enabled = 'false' ";
sql = sql .. "and follow_me_uuid = '"..follow_me_uuid.."' "; sql = sql .. "where domain_uuid = '"..domain_uuid.."' ";
if (debug["sql"]) then sql = sql .. "and follow_me_uuid = '"..follow_me_uuid.."' ";
freeswitch.consoleLog("notice", "[do_not_disturb] "..sql.."\n"); if (debug["sql"]) then
freeswitch.consoleLog("notice", "[do_not_disturb] "..sql.."\n");
end
dbh:query(sql);
end end
dbh:query(sql);
end end
--update the extension --update the extension
@ -151,7 +153,6 @@
end end
dbh:query(sql); dbh:query(sql);
--clear the cache --clear the cache
if (extension ~= nil) then if (extension ~= nil) then
api:execute("memcache", "delete directory:"..extension.."@"..domain_name); api:execute("memcache", "delete directory:"..extension.."@"..domain_name);