MWX/SpamFerret/tables/pattern: Difference between revisions

From Woozle Writes Code
< MWX‎ | SpamFerret‎ | tables
Jump to navigation Jump to search
m (2 revisions imported: moving here)
m (Woozle moved page SpamFerret/tables/pattern to MWX/SpamFerret/tables/pattern without leaving a redirect: most mediawiki extensions belong under MWX now)
 
(No difference)

Latest revision as of 20:14, 1 May 2022

About

  • Fields:
    • isURL is turning out to be rather useless, partly because it wasn't clear from the beginning exactly what it was for
  • History:
    • 2009-07-14 Adding attempts.diff and patterns.isDiff to enable more advanced filtering (e.g. bots which delete most of a section and replace it with a nonsense word)
    • 2009-08-05 Adding ID_Archive field (part of new pattern maintenance system)
    • 2009-10-06 Adding Notes field (need to be able to make notes on a pattern's intent)
    • 2011-02-03 Adapting from Template:Spamferret -- basically the same, but without any activity or status fields, since this table now holds only active patterns
    • 2011-02-09 New fields: inText, inTitle, okTrust
      • "Trusted users" will generally mean registered users who have passed some threshold of credibility ("auto-confirmed")
      • We might later refine this to specify group membership required in order to let this edit through.

SQL

<mysql>CREATE TABLE `pattern` (

 `ID` INT NOT NULL AUTO_INCREMENT,
 `Pattern`   VARCHAR(255)             COMMENT "pattern to match (regex or straight text match)",
 `ID_Archive` INT         NOT NULL    COMMENT "pattern_archive.ID of source for this pattern",
 `inText`    TINYINT(1) DEFAULT TRUE  COMMENT "look for Pattern in the post's text",
 `inTitle`   TINYINT(1) DEFAULT FALSE COMMENT "look for Pattern in the post's title (new pages and moves)",
 `okTrust`   TINYINT(1) DEFAULT FALSE COMMENT "trusted users will only get a warning if this matches their post",
 `isURL`     TINYINT(1)               COMMENT "TRUE indicates that additional URL-related stats may be collected",
 `isRegex`   TINYINT(1)               COMMENT "TRUE = regex (use preg_match()); FALSE = normal string comparison (use stristr())",
 `isDiff`    TINYINT(1) DEFAULT FALSE COMMENT "TRUE = pattern should be compared to the diff, not the edit contents",
 `WhenTried` DATETIME   DEFAULT NULL  COMMENT "when a spammer last attempted to include this pattern",
 `Count`     INT        DEFAULT 0     COMMENT "number of attempts since pattern was activated",
 PRIMARY KEY(`ID`)

) ENGINE = MYISAM;</mysql>