Commons:API/donotuse

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Description:

def problemtemplates:
  problemtemplates = []
  templates = template pages in Category:Problem tags
  for template in templates:
    problemtemplates.append(template)
    redirects = template pages that direct to template
    for redirect in redirects:
      problemtemplates.append(redirect)    
  return problemtemplates
def isproblematic(filepagename):
  templates = extracted templates for filepagename [MediaWiki API]
  for template in templates:
    if template in problemtemplates:
      return True
  return False