aboutsummaryrefslogtreecommitdiff
path: root/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
diff options
context:
space:
mode:
authorRobin Krahl <me@robin-krahl.de>2015-06-27 15:34:11 +0200
committerRobin Krahl <me@robin-krahl.de>2015-06-27 15:34:11 +0200
commit8862341672dc288596d6ef66f92751bba6dfef25 (patch)
tree2b8ec8eee86ed052e50ec6b01f04d8e5a112723e /mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
parent848f6be3a29fb68ef43086ba2c1401162f0f845f (diff)
downloadLrMediaWiki-8862341672dc288596d6ef66f92751bba6dfef25.tar.gz
LrMediaWiki-8862341672dc288596d6ef66f92751bba6dfef25.tar.bz2
Fix coding style and add `luacheck` to Travis CI.
Fix #40.
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua')
-rwxr-xr-xmediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
index c9d5a1a..8038ee4 100755
--- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
+++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
@@ -31,7 +31,7 @@ MediaWikiExportServiceProvider.processRenderedPhotos = function(functionContext,
-- configure progess display
local exportSession = exportContext.exportSession
local photoCount = exportSession:countRenditions()
- local progressScope = exportContext:configureProgress{
+ exportContext:configureProgress{
title = photoCount > 1 and LOC('$$$/LrMediaWiki/Export/Progress=Exporting ^1 photos to a MediaWiki', photoCount) or LOC '$$$/LrMediaWiki/Export/Progress/One=Exporting one photo to a MediaWiki',
}
@@ -60,7 +60,8 @@ MediaWikiExportServiceProvider.processRenderedPhotos = function(functionContext,
MediaWikiInterface.prepareUpload(exportSettings.username, exportSettings.password, exportSettings.api_path)
-- iterate over photos
- for i, rendition in exportContext:renditions() do
+ for item in exportContext:renditions() do
+ local rendition = item[1]
-- render photo
local success, pathOrMessage = rendition:waitForRender()
if success then
@@ -291,7 +292,7 @@ MediaWikiExportServiceProvider.sectionsForTopOfDialog = function(viewFactory, pr
viewFactory:push_button {
title = LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext',
action = function(button)
- result, message = MediaWikiInterface.loadFileDescriptionTemplate()
+ local result, message = MediaWikiInterface.loadFileDescriptionTemplate()
if result then
local wikitext = MediaWikiInterface.buildFileDescription('<!-- description -->', propertyTable.info_source, '<!-- date -->', propertyTable.info_author, propertyTable.info_license, '<!-- {{Location}} if GPS metadata is available -->\n' .. propertyTable.info_templates, propertyTable.info_other, propertyTable.info_categories, '<!-- per-file categories -->', '<!-- permission -->')
LrDialogs.message(LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext', wikitext, 'info')