MWX/SpamFerret/views/AttemptsEx

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | views
Revision as of 20:14, 1 May 2022 by Woozle (talk | contribs) (Woozle moved page SpamFerret/views/AttemptsEx to MWX/SpamFerret/views/AttemptsEx without leaving a redirect: most mediawiki extensions belong under MWX now)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

  • Purpose: Eventually, a SpecialPage with reports would be nice, but for now you can see what's being blocked, and where the spam attempts are coming from, with this query conveniently packaged in a stored "view":

SQL

<mysql>CREATE OR REPLACE VIEW `AttemptsEx` AS

 SELECT
   a.ID,
   a.`When` AS WhenDone,
   a.Code,
   a.ID_Pattern,
   p.Pattern,
   a.ID_Client,
   c.Address,
   c.doBlock,
   a.PageServer,
   a.PageName,
   a.MatchText,
   a.didAllow
 FROM
   (
     (attempts AS a
       LEFT JOIN patterns AS p
       ON (a.ID_Pattern = p.ID)
      ) LEFT JOIN clients AS c
        ON (a.ID_Client = c.ID)
    ) ORDER BY a.ID DESC;</mysql>