aboutsummaryrefslogtreecommitdiff
path: root/mediawiki.lrdevplugin/MediaWikiUtils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiUtils.lua')
-rw-r--r--mediawiki.lrdevplugin/MediaWikiUtils.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiUtils.lua b/mediawiki.lrdevplugin/MediaWikiUtils.lua
index 6093b8a..00dd46d 100644
--- a/mediawiki.lrdevplugin/MediaWikiUtils.lua
+++ b/mediawiki.lrdevplugin/MediaWikiUtils.lua
@@ -13,10 +13,20 @@
-- doc: missing
-- i18n: complete
+local Info = require 'Info'
+
local MediaWikiUtils = {}
MediaWikiUtils.isStringEmpty = function(str)
return str == nil or string.match(str, '^%s*$') ~= nil
end
-return MediaWikiUtils \ No newline at end of file
+MediaWikiUtils.getVersionString = function()
+ local str = Info.VERSION.major .. '.' .. Info.VERSION.minor
+ if Info.VERSION.revision > 0 then
+ str = str .. '.' .. Info.VERSION.revision
+ end
+ return str
+end
+
+return MediaWikiUtils