diff options
author | Robin Krahl <me@robin-krahl.de> | 2015-06-27 21:27:07 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2015-06-27 21:27:07 +0200 |
commit | 2aa81315b96cd59fd469799d4d7847a682116163 (patch) | |
tree | c40a9fcc2763c2176508b78283bec1fdd4d9759c /mediawiki.lrdevplugin/MediaWikiUtils.lua | |
parent | d513bc565782965d66c6307bfefe21dc3fd36c1a (diff) | |
download | LrMediaWiki-2aa81315b96cd59fd469799d4d7847a682116163.tar.gz LrMediaWiki-2aa81315b96cd59fd469799d4d7847a682116163.tar.bz2 |
Add configuration for snapshot creation.
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 snapshot creation in
MediaWikiExportServiceProvider.processRenderedPhotos after the successful
upload
- check the ‘Snapshot creation’ setting before creating the snapshot in
MediaWikiExportServiceProvider.processRenderedPhotos
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiUtils.lua')
-rw-r--r-- | mediawiki.lrdevplugin/MediaWikiUtils.lua | 15 |
1 files changed, 15 insertions, 0 deletions
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
|