From ffc819355032db2547e9b03d07a1b800885d60b4 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Sat, 27 Jun 2015 21:28:27 +0200 Subject: Add configuration for snapshot creation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The creation of snapshots after the export now depends on a new setting. The snapshots now are created after the successful export instead of before any export. - move the preferences handling to MediaWikiUtils - add the ‘Snapshot creation’ setting to MediaWikiPluginInfoProvider and MediaWikiUtils - move the snapshot creation in MediaWikiExportServiceProvider.processRenderedPhotos after the successful upload - check the ‘Snapshot creation’ setting before creating the snapshot in MediaWikiExportServiceProvider.processRenderedPhotos - update the internationalization --- mediawiki.lrdevplugin/MediaWikiUtils.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mediawiki.lrdevplugin/MediaWikiUtils.lua') diff --git a/mediawiki.lrdevplugin/MediaWikiUtils.lua b/mediawiki.lrdevplugin/MediaWikiUtils.lua index 6727e3b..abde828 100644 --- a/mediawiki.lrdevplugin/MediaWikiUtils.lua +++ b/mediawiki.lrdevplugin/MediaWikiUtils.lua @@ -42,7 +42,22 @@ MediaWikiUtils.getVersionString = function() return str end +-- configuration + +MediaWikiUtils.getCreateSnapshots = function() + return prefs.create_snapshot or false +end + +MediaWikiUtils.setCreateSnapshots = function(create_snapshot) + prefs.create_snapshot = create_snapshot +end + +MediaWikiUtils.getLogging = function() + return prefs.logging or false +end + MediaWikiUtils.setLogging = function(logging) + prefs.logging = logging if logging then myLogger:enable('logfile') else -- cgit v1.2.1