mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-15 02:03:58 +00:00
bf188e7af1
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
23 lines
475 B
Lua
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
|