From eea25f2f08c37593d7057a8af78412cb6b72c671 Mon Sep 17 00:00:00 2001 From: spag Date: Sun, 23 Dec 2012 16:06:07 +0100 Subject: obsolete methods deleted --- misc/freeswitch/scripts/phones/phone.lua | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'misc/freeswitch/scripts/phones/phone.lua') diff --git a/misc/freeswitch/scripts/phones/phone.lua b/misc/freeswitch/scripts/phones/phone.lua index 4a32c37..bc2aa3d 100644 --- a/misc/freeswitch/scripts/phones/phone.lua +++ b/misc/freeswitch/scripts/phones/phone.lua @@ -80,20 +80,6 @@ function Phone.find_hot_deskable_by_account(self, account_id) end -function Phone.tenant_id_get(self) - local sql_query = 'SELECT `c`.`sip_accountable_id` \ - FROM `phones` `a` LEFT JOIN `phone_sip_accounts` `b` ON `a`.`id` = `b`.`phone_id` \ - JOIN `sip_accounts` `c` ON `b`.`sip_account_id` = `c`.`id` AND `sip_accountable_type` = "Tenant" \ - WHERE `a`.`id` = ' .. tonumber(self.record.id) .. ' LIMIT 1'; - - local tenant_id = nil; - self.database:query(sql_query, function(tenant_entry) - tenant_id = tenant_entry.sip_accountable_id; - end) - - return tenant_id; -end - function Phone.phoneable_set(self, phoneable_id, phoneable_type) sql_query = 'UPDATE `phones` SET `phoneable_type` = "' .. phoneable_type ..'", `phoneable_id` = ' .. phoneable_id .. ' \ WHERE `id` = ' .. tonumber(self.record.id); -- cgit v1.2.3