From d3ba117b246a5e6e21c93b94cd40ae460d2d3541 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 27 Jun 2015 19:29:11 +0200 Subject: Add logging support and fix refactoring errors. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The user now may enable logging in MediaWikiUtils. If logging is enabled, a log file is written to the user’s "My Documents" that contains all API requests. Furthermore, bugs introduced by the refactoring in commit 8862341672dc288596d6ef66f92751bba6dfef25 have been fixed. - set up logging in MediaWikiUtils - write to the log in MediaWikiApi.performRequest - fix error in MediaWikiExportServiceProvider.processRenderedPhotos - fix error in MediaWikiApi.parseXmlDom Fix #43. --- mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua') diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua index 8405cea..accbf88 100755 --- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua +++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua @@ -60,8 +60,7 @@ MediaWikiExportServiceProvider.processRenderedPhotos = function(functionContext, MediaWikiInterface.prepareUpload(exportSettings.username, exportSettings.password, exportSettings.api_path) -- iterate over photos - for item in exportContext:renditions() do - local rendition = item[1] + for i, rendition in exportContext:renditions() do -- render photo local success, pathOrMessage = rendition:waitForRender() if success then -- cgit v1.2.1