mediawiki-extensions-TitleB.../mw.ext.TitleBlacklist.lua
Jackmcbarn bf188e7af1 Add mw.ext.TitleBlacklist.test
Add lua method mw.ext.TitleBlacklist.test(action, title), which tests
whether a titleblacklist entry is active for a given title and action, and
if so, returns details of the entry.

Change-Id: I4360d1ad4e602d58dabd12b683d338a0e09a2950
2014-01-14 17:06:07 -05:00

23 lines
475 B
Lua

local TitleBlacklist = {}
local php
function TitleBlacklist.test( action, title )
return php.test( action, title )
end
function TitleBlacklist.setupInterface( options )
-- Boilerplate
TitleBlacklist.setupInterface = nil
php = mw_interface
mw_interface = nil
-- Register this library in the "mw" global
mw = mw or {}
mw.ext = mw.ext or {}
mw.ext.TitleBlacklist = TitleBlacklist
package.loaded['mw.ext.TitleBlacklist'] = TitleBlacklist
end
return TitleBlacklist