Modul:Check isxn: Unterschied zwischen den Versionen
Undid revision 674386007 by Frietjes (talk)
imported>Frietjes (testing) |
imported>Frietjes |
||
| Zeile 66: | Zeile 66: | ||
local temp = 0; | local temp = 0; | ||
if isbn_str:match( "^97[89]%d*$" ) == nil then return false; end -- isbn13 begins with 978 or 979; ismn begins with 979 | if isbn_str:match( "^97[89]%d*$" ) == nil then return false; end -- isbn13 begins with 978 or 979; ismn begins with 979 | ||
return is_valid_isxn_13 (isbn_str) and '' or | return is_valid_isxn_13 (isbn_str) and '' or error_string; | ||
end | end | ||
end | end | ||
| Zeile 123: | Zeile 123: | ||
function p.check_isbn(frame) | function p.check_isbn(frame) | ||
return | return check_isbn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error') | ||
end | end | ||
function p.check_ismn(frame) | function p.check_ismn(frame) | ||
return | return check_ismn(frame.args[1] or frame:getParent().args[1], frame.args['error'] or frame:getParent().args['error'] or 'error') | ||
end | end | ||