-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppropediaLua.lua
39 lines (30 loc) · 884 Bytes
/
AppropediaLua.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
-- The Appropedia Lua library gets data for the Appropedia Lua module
-- See https://www.appropedia.org/Module:Appropedia
local appropedia = {}
local php
function appropedia.setupInterface( options )
-- Remove setup function
appropedia.setupInterface = nil
-- Copy the PHP callbacks to a local variable, and remove the global
php = mw_interface
mw_interface = nil
-- Install into the mw global
mw = mw or {}
mw.ext = mw.ext or {}
mw.ext.appropedia = appropedia
-- Indicate that we're loaded
package.loaded['mw.ext.appropedia'] = appropedia
end
function appropedia.emailDomain( user )
return php.emailDomain( user )
end
function appropedia.pageExists( page )
return php.pageExists( page )
end
function appropedia.pageCategories( page )
return php.pageCategories( page )
end
function appropedia.fileUses( file )
return php.fileUses( file )
end
return appropedia