Jump to content

Module:AfC submission catcheck

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by WOSlinker (talk | contribs) at 07:01, 17 April 2013 (Protected Module:AFC submission catcheck: since Template:AFC submission is protected ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local i = {}

function i.checkforcats(frame)
    local t = mw.title.getCurrentTitle()
    tc = t:getContent()
    if tc == nil then 
        return ""
    end
    tc = mw.ustring.gsub(tc,"%[%[Category:Articles created via the Article Wizard%]%]","")
    if mw.ustring.match(tc, "%[%[%s-[Cc]ategory:" ) == nil then
        return ""
    else
        return "[[Category:AfC submissions with categories]]"
    end
end
 
return i