Sətir 368: |
Sətir 368: |
| error_message=error_message .. "|" .. k .. "="; -- add the failed parameter | | error_message=error_message .. "|" .. k .. "="; -- add the failed parameter |
| end | | end |
| + | end |
| + | if is_set (error_message) then -- done looping, if there is an error message, display it |
| + | table.insert( z.message_tail, { set_error( 'param_has_ext_link', {error_message}, true ) } ); |
| end | | end |
| end | | end |
Sətir 380: |
Sətir 383: |
| local function safe_for_url( str ) | | local function safe_for_url( str ) |
| if str:match( "%[%[.-%]%]" ) ~= nil then | | if str:match( "%[%[.-%]%]" ) ~= nil then |
| + | table.insert( z.message_tail, { set_error( 'wikilink_in_url', {}, true ) } ); |
| end | | end |
| | | |
Sətir 400: |
Sətir 404: |
| local path; | | local path; |
| local base_url; | | local base_url; |
− | | + | |
| if not is_set( label ) then | | if not is_set( label ) then |
| label = URL; | | label = URL; |
Sətir 420: |
Sətir 424: |
| | | |
| base_url = table.concat({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wikimarkup url | | base_url = table.concat({ "[", URL, " ", safe_for_url (label), "]" }); -- assemble a wikimarkup url |
− | | + | |
| if is_set (access) then -- access level (subscription, registration, limited) | | if is_set (access) then -- access level (subscription, registration, limited) |
| base_url = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon | | base_url = substitute (cfg.presentation['ext-link-access-signal'], {cfg.presentation[access].class, cfg.presentation[access].title, base_url}); -- add the appropriate icon |