diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-02-01 13:40:09 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-02-01 13:40:09 +0000 |
commit | 16acb92a450f83c61c301021b922f2c3ee8b147a (patch) | |
tree | 5d5afa0c1dd76257b37155548477d7fe5cfffa63 /lib | |
parent | c6fff673cf5a1debc780835f5144e40c9ef8dffb (diff) | |
download | acf-core-16acb92a450f83c61c301021b922f2c3ee8b147a.tar.bz2 acf-core-16acb92a450f83c61c301021b922f2c3ee8b147a.tar.xz |
Chaning the way this lib reports back status
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@674 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/validator.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/validator.lua b/lib/validator.lua index a008397..f75be3a 100755 --- a/lib/validator.lua +++ b/lib/validator.lua @@ -189,9 +189,8 @@ end function is_valid_filename ( path, restriction ) if not (path) or ((restriction) and (string.find (path, "^" .. restriction ) == nil)) then - return nil, validator.msg.err.FileInvalidPath[lang.Current] .. "\n" .. - " * " .. validator.msg.err.FileInvalidPath1[lang.Current] ..":" .. string.format(path) .. "\n * ".. + return false, "* " .. validator.msg.err.FileInvalidPath1[lang.Current] ..":" .. string.format(path) .. "\n* ".. validator.msg.err.FileInvalidPath2[lang.Current] .. ":" .. string.format(restriction) end - return path + return true, path end |