liquid_feedback_frontend

changeset 728:f49cdfb72567

Migration of extos calls from os.* to extos.* comleted
author bsw
date Thu Jun 28 16:31:02 2012 +0200 (2012-06-28)
parents 161cebfc44d4
children f52f918b38b8
files app/main/draft/diff.lua app/main/index/document.lua app/main/index/download.lua config/default.lua config/example.lua env/format/wiki_text.lua env/net/curl.lua model/member.lua
line diff
     1.1 --- a/app/main/draft/diff.lua	Thu Jun 28 16:16:02 2012 +0200
     1.2 +++ b/app/main/draft/diff.lua	Thu Jun 28 16:31:02 2012 +0200
     1.3 @@ -73,7 +73,7 @@
     1.4  new_draft_file:write("\n")
     1.5  new_draft_file:close()
     1.6  
     1.7 -local output, err, status = os.pfilter(nil, "sh", "-c", "diff -U 1000000000 '" .. old_draft_filename .. "' '" .. new_draft_filename .. "' | grep -v ^--- | grep -v ^+++ | grep -v ^@")
     1.8 +local output, err, status = extos.pfilter(nil, "sh", "-c", "diff -U 1000000000 '" .. old_draft_filename .. "' '" .. new_draft_filename .. "' | grep -v ^--- | grep -v ^+++ | grep -v ^@")
     1.9  
    1.10  os.remove(old_draft_filename)
    1.11  os.remove(new_draft_filename)
     2.1 --- a/app/main/index/document.lua	Thu Jun 28 16:16:02 2012 +0200
     2.2 +++ b/app/main/index/document.lua	Thu Jun 28 16:31:02 2012 +0200
     2.3 @@ -17,7 +17,7 @@
     2.4  
     2.5  util.help("index.document", _"Download documents")
     2.6  
     2.7 -local file_list = os.listdir(config.document_dir)
     2.8 +local file_list = extos.listdir(config.document_dir)
     2.9  
    2.10  local tmp = {}
    2.11  for i, filename in ipairs(file_list) do
     3.1 --- a/app/main/index/download.lua	Thu Jun 28 16:16:02 2012 +0200
     3.2 +++ b/app/main/index/download.lua	Thu Jun 28 16:31:02 2012 +0200
     3.3 @@ -25,7 +25,7 @@
     3.4  }
     3.5  
     3.6  
     3.7 -local file_list = os.listdir(config.download_dir)
     3.8 +local file_list = extos.listdir(config.download_dir)
     3.9  
    3.10  local tmp = {}
    3.11  for i, filename in ipairs(file_list) do
     4.1 --- a/config/default.lua	Thu Jun 28 16:16:02 2012 +0200
     4.2 +++ b/config/default.lua	Thu Jun 28 16:31:02 2012 +0200
     4.3 @@ -1,13 +1,3 @@
     4.4 --- forward compatibility for webmcp 1.2
     4.5 -if not os.pfilter then
     4.6 -  os.pfilter = extos.pfilter
     4.7 -end
     4.8 -if not os.listdir then
     4.9 -  os.listdir = extos.listdir
    4.10 -end
    4.11 -if not os.crypt then
    4.12 -  os.crypt = extos.crypt
    4.13 -end
    4.14  
    4.15  config.app_name = "LiquidFeedback"
    4.16  config.app_version = "2.beta12"
    4.17 @@ -39,8 +29,8 @@
    4.18  
    4.19  config.member_image_content_type = "image/jpeg"
    4.20  config.member_image_convert_func = {
    4.21 -  avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail",   "48x48", "jpeg:-") end,
    4.22 -  photo =  function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
    4.23 +  avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail",   "48x48", "jpeg:-") end,
    4.24 +  photo =  function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
    4.25  }
    4.26  
    4.27  config.member_image_default_file = {
     5.1 --- a/config/example.lua	Thu Jun 28 16:16:02 2012 +0200
     5.2 +++ b/config/example.lua	Thu Jun 28 16:31:02 2012 +0200
     5.3 @@ -39,8 +39,8 @@
     5.4  
     5.5  config.member_image_content_type = "image/jpeg"
     5.6  config.member_image_convert_func = {
     5.7 -  avatar = function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail",   "48x48", "jpeg:-") end,
     5.8 -  photo =  function(data) return os.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
     5.9 +  avatar = function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail",   "48x48", "jpeg:-") end,
    5.10 +  photo =  function(data) return extos.pfilter(data, "convert", "jpeg:-", "-thumbnail", "240x240", "jpeg:-") end
    5.11  }
    5.12  
    5.13  config.member_image_default_file = {
     6.1 --- a/env/format/wiki_text.lua	Thu Jun 28 16:16:02 2012 +0200
     6.2 +++ b/env/format/wiki_text.lua	Thu Jun 28 16:31:02 2012 +0200
     6.3 @@ -1,7 +1,7 @@
     6.4  function format.wiki_text(wiki_text, formatting_engine)
     6.5    local formatting_engine = formatting_engine or "rocketwiki"
     6.6    local html, errmsg, exitcode = assert(
     6.7 -    os.pfilter(wiki_text, config.formatting_engine_executeables[formatting_engine])
     6.8 +    extos.pfilter(wiki_text, config.formatting_engine_executeables[formatting_engine])
     6.9    )
    6.10    if exitcode > 0 then
    6.11      error("Wiki parser process returned with error code " .. tostring(exitcode))
     7.1 --- a/env/net/curl.lua	Thu Jun 28 16:16:02 2012 +0200
     7.2 +++ b/env/net/curl.lua	Thu Jun 28 16:31:02 2012 +0200
     7.3 @@ -1,5 +1,5 @@
     7.4  function net.curl(url)
     7.5 -  local stdout, errmsg, status = os.pfilter(nil, "curl", url)
     7.6 +  local stdout, errmsg, status = extos.pfilter(nil, "curl", url)
     7.7    if not stdout then
     7.8      error("Error while executing curl: " .. errmsg)
     7.9    end
     8.1 --- a/model/member.lua	Thu Jun 28 16:16:02 2012 +0200
     8.2 +++ b/model/member.lua	Thu Jun 28 16:31:02 2012 +0200
     8.3 @@ -270,20 +270,20 @@
     8.4  end
     8.5  
     8.6  function Member.object:set_password(password)
     8.7 -  local hash = os.crypt(
     8.8 +  local hash = extos.crypt(
     8.9      password,
    8.10      "$1$" .. multirand.string(
    8.11        8,
    8.12        "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./"
    8.13      )
    8.14    )
    8.15 -  assert(hash, "os.crypt failed")
    8.16 +  assert(hash, "extos.crypt failed")
    8.17    self.password = hash
    8.18  end
    8.19  
    8.20  function Member.object:check_password(password)
    8.21    if type(password) == "string" and type(self.password) == "string" then
    8.22 -    return os.crypt(password, self.password) == self.password
    8.23 +    return extos.crypt(password, self.password) == self.password
    8.24    else
    8.25      return false
    8.26    end

Impressum / About Us