diff options
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 abde828..588121d 100644 --- a/mediawiki.lrdevplugin/MediaWikiUtils.lua +++ b/mediawiki.lrdevplugin/MediaWikiUtils.lua @@ -34,6 +34,13 @@ MediaWikiUtils.isStringEmpty = function(str) return str == nil or string.match(str, '^%s*$') ~= nil
end
+MediaWikiUtils.getFirstKey = function(table)
+ for key, value in pairs(table) do
+ return key
+ end
+ return nil
+end
+
MediaWikiUtils.getVersionString = function()
local str = Info.VERSION.major .. '.' .. Info.VERSION.minor
if Info.VERSION.revision > 0 then
@@ -52,6 +59,14 @@ MediaWikiUtils.setCreateSnapshots = function(create_snapshot) prefs.create_snapshot = create_snapshot
end
+MediaWikiUtils.getCheckVersion = function()
+ return prefs.check_version or false
+end
+
+MediaWikiUtils.setCheckVersion = function(check_version)
+ prefs.check_version = check_version
+end
+
MediaWikiUtils.getLogging = function()
return prefs.logging or false
end
|