Dotclear 2.24
Loading...
Searching...
No Matches
dcSpamFilters Class Reference

Public Member Functions

 init (array $filters)
 
 getFilters ()
 
 isSpam (cursor $cur)
 
 trainFilters (dcRecord $rs, string $status, string $filter_name)
 
 statusMessage (dcRecord $rs, string $filter_name)
 
 saveFilterOpts (array $opts, bool $global=false)
 

Member Function Documentation

◆ init()

init ( array  $filters)

Initializes the given filters.

Parameters
array$filtersThe filters

References dcCore\app().

◆ getFilters()

getFilters ( )

Gets the filters.

Returns
array The filters.

◆ isSpam()

isSpam ( cursor  $cur)

Determines whether the specified cursor is a spam.

Parameters
cursor$curThe cursor
Returns
bool True if the specified current is spam, False otherwise.

References cursor\clean(), and dcBlog\COMMENT_JUNK.

◆ trainFilters()

trainFilters ( dcRecord  $rs,
string  $status,
string  $filter_name 
)

Train antispam filters with current comment in record

Parameters
dcRecord$rsThe comment record
string$statusThe status
string$filter_nameThe filter name

◆ statusMessage()

statusMessage ( dcRecord  $rs,
string  $filter_name 
)

Get filter status message

Parameters
dcRecord$rsThe comment record
string$filter_nameThe filter name
Returns
string

References dcRecord\exists().

◆ saveFilterOpts()

saveFilterOpts ( array  $opts,
bool  $global = false 
)

Saves filter settings.

Parameters
array$optsThe settings
bool$globalTrue if global settings

References dcCore\app().


The documentation for this class was generated from the following file: