mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 02:46:30 +00:00
WhitespaceClean-resources/install/scripts
whitespace pass over files for reference regex that was used s/[ \t]+(\r?\n)/\1/
This commit is contained in:
@@ -7,7 +7,7 @@ local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
|
||||
|
||||
-- encoding
|
||||
function base64.enc(data)
|
||||
return ((data:gsub('.', function(x)
|
||||
return ((data:gsub('.', function(x)
|
||||
local r,b='',x:byte()
|
||||
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
|
||||
return r;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
require "resources.functions.trim";
|
||||
|
||||
local api = api
|
||||
local api = api
|
||||
if not api then
|
||||
if freeswitch then
|
||||
api = freeswitch.API()
|
||||
@@ -92,7 +92,7 @@ function Cache._self_test()
|
||||
local ok, err = Cache.get("a")
|
||||
assert(nil == ok)
|
||||
assert(err == "NOT FOUND")
|
||||
|
||||
|
||||
local s = "hello \\ ' world"
|
||||
assert(true == Cache.set("a", s))
|
||||
assert(s == Cache.get("a"))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
-- @usage
|
||||
-- @usage
|
||||
-- -- Use default backend
|
||||
-- dbh = Database.new("system")
|
||||
-- .....
|
||||
--
|
||||
-- @usage
|
||||
-- @usage
|
||||
-- -- Use LuaSQL backend
|
||||
-- dbh = Database.backend.luasql("system")
|
||||
-- .....
|
||||
@@ -163,7 +163,7 @@ end
|
||||
-----------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------
|
||||
local Database = {} do
|
||||
local Database = {} do
|
||||
|
||||
local backend_loader = setmetatable({}, {__index = function(self, backend)
|
||||
local class = require("resources.functions.database." .. backend)
|
||||
|
||||
@@ -8,7 +8,7 @@ local odbc = require "odbc.dba"
|
||||
local function remove_null(row, null, null_value)
|
||||
local o = {}
|
||||
for k, v in pairs(row) do
|
||||
if v == null then
|
||||
if v == null then
|
||||
o[k] = null_value
|
||||
else
|
||||
o[k] = tostring(v)
|
||||
|
||||
@@ -9,7 +9,7 @@ local odbcpool = require "odbc.dba.pool"
|
||||
local function remove_null(row, null, null_value)
|
||||
local o = {}
|
||||
for k, v in pairs(row) do
|
||||
if v == null then
|
||||
if v == null then
|
||||
o[k] = null_value
|
||||
else
|
||||
o[k] = tostring(v)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
--add the explode function
|
||||
function explode ( seperator, str )
|
||||
function explode ( seperator, str )
|
||||
local pos, arr = 0, {}
|
||||
if (seperator ~= nil and str ~= nil) then
|
||||
for st, sp in function() return string.find( str, seperator, pos, true ) end do -- for each divider found
|
||||
|
||||
@@ -95,7 +95,7 @@ function Settings:_load(category, subcategory, name)
|
||||
if type(self._db) == 'string' then
|
||||
db = Database.new(self._db)
|
||||
end
|
||||
|
||||
|
||||
local found = false
|
||||
--get the domain settings
|
||||
if domain_uuid then
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
return max;
|
||||
end
|
||||
|
||||
--define select_entry function
|
||||
--define select_entry function
|
||||
function settings(domain_uuid)
|
||||
|
||||
--define the table
|
||||
@@ -124,7 +124,7 @@
|
||||
subcategory = row.domain_setting_subcategory;
|
||||
name = row.domain_setting_name;
|
||||
value = row.domain_setting_value;
|
||||
|
||||
|
||||
--add the category array
|
||||
if (array[category] == nil) then
|
||||
array[category] = {}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
---
|
||||
-- @tparam table dict Dictionary
|
||||
-- @tparam[opt='en'] string language default language
|
||||
-- @tparam[opt='us'] string dialect default language
|
||||
-- @return[1] nil if key is unknown
|
||||
-- @return[2] empty string if language/dialect unknown or there no appropriate value for default language/dialect
|
||||
-- @return[3] translated value accordint dictionary/language/dialect
|
||||
--
|
||||
--
|
||||
-- @usage
|
||||
-- local dict = {
|
||||
-- ['label-text'] = {
|
||||
|
||||
Reference in New Issue
Block a user