summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Havela <mika.havela@gmail.com>2008-02-05 15:39:24 +0000
committerMika Havela <mika.havela@gmail.com>2008-02-05 15:39:24 +0000
commit19494ade774cf3b5007e017951bb34d0705bcc79 (patch)
treeaadc222d9fdebeb7410212cd42848b5f31b1949e
parentdce730f2e59d6d66d911de45c8a080ac0aa0b2bc (diff)
downloadacf-fetchmail-19494ade774cf3b5007e017951bb34d0705bcc79.tar.bz2
acf-fetchmail-19494ade774cf3b5007e017951bb34d0705bcc79.tar.xz
Added a empty mailbox-item so the page doesn't look funny when there is no config.
git-svn-id: svn://svn.alpinelinux.org/acf/fetchmail/trunk@695 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--fetchmail-model.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/fetchmail-model.lua b/fetchmail-model.lua
index 330e68f..075ae77 100644
--- a/fetchmail-model.lua
+++ b/fetchmail-model.lua
@@ -108,10 +108,7 @@ pool <host> protocol etrn smtpdomain <mydomain>
for k,v in pairs(configcontenttable) do
if (string.match(v, "^%s*#Begin Fetchmail")) then valid=1 end
if (valid) then
--- if not (configcontent[k]) then configcontent[k] = {} end
--- if not (configcontent_popimap[k]) then configcontent_popimap[k] = {} end
--- if not (configcontent_popdomain[k]) then configcontent_popdomain[k] = {} end
-
+ --
local DISABLED = string.match(v, "^%s*(#)")
-- Set parameters for POP3 or IMAP
@@ -176,10 +173,11 @@ pool <host> protocol etrn smtpdomain <mydomain>
configcontent_postmaster=configcontent[k]
end
-
end
if (string.match(v, "^%s*#End Fetchmail")) then valid=nil end
end
+ -- Create one empty record so that user can add settings
+ table.insert(mailboxes,getmailboxes({}))
return mailboxes,configcontent_postmaster,configcontent_etrn
end