From 8862341672dc288596d6ef66f92751bba6dfef25 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 27 Jun 2015 15:34:11 +0200 Subject: Fix coding style and add `luacheck` to Travis CI. Fix #40. --- mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua') 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('', propertyTable.info_source, '', propertyTable.info_author, propertyTable.info_license, '\n' .. propertyTable.info_templates, propertyTable.info_other, propertyTable.info_categories, '', '') LrDialogs.message(LOC '$$$/LrMediaWiki/Section/Licensing/Preview=Preview generated wikitext', wikitext, 'info') -- cgit v1.2.1