WhitespaceClean-resources/install/scripts

whitespace pass over files
for reference regex that was used s/[ \t]+(\r?\n)/\1/
This commit is contained in:
mafoo
2016-03-11 13:21:52 +00:00
parent 66ba2802bd
commit 0eb7d5ddac
55 changed files with 269 additions and 269 deletions

View File

@@ -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;

View File

@@ -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"))

View File

@@ -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)

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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] = {}

View File

@@ -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'] = {