aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmediawiki.lrdevplugin/MediaWikiApi.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiApi.lua b/mediawiki.lrdevplugin/MediaWikiApi.lua
index 3b1723d..96c3de0 100755
--- a/mediawiki.lrdevplugin/MediaWikiApi.lua
+++ b/mediawiki.lrdevplugin/MediaWikiApi.lua
@@ -247,11 +247,12 @@ function MediaWikiApi.upload(fileName, sourceFilePath, text, comment, ignoreWarn
return true
elseif uploadResult == 'Warning' then
local warnings = ''
- for pair in pairs(resultXml.upload.warnings) do
+ -- concatenate the keys of the warnings table (= MediaWiki name of the warning)
+ for warning in pairs(resultXml.upload.warnings) do
if warnings ~= '' then
warnings = warnings .. ', '
end
- warnings = warnings .. pair[0]
+ warnings = warnings .. warning
end
return warnings
else