aboutsummaryrefslogtreecommitdiff
path: root/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua')
-rwxr-xr-xmediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
index b88e1b0..b940cc8 100755
--- a/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
+++ b/mediawiki.lrdevplugin/MediaWikiExportServiceProvider.lua
@@ -131,6 +131,14 @@ MediaWikiExportServiceProvider.processRenderedPhotos = function(functionContext,
end)
end
+ -- add configured export keyword
+ local keyword = MediaWikiUtils.getExportKeyword()
+ if not MediaWikiUtils.isStringEmpty(keyword) then
+ catalog:withWriteAccessDo('AddExportKeyword', function(context)
+ photo:addKeyword(catalog:createKeyword(keyword, {}, false, nil, true))
+ end)
+ end
+
-- file name for gallery creation
fileNames[#fileNames + 1] = fileName
end