BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
LogPage Class Reference
Collaboration diagram for LogPage:

Public Member Functions

 __construct ($type, $rc=true, $udp= 'skipUDP')
 
 getRcComment ()
 
 getRcCommentIRC ()
 
 getComment ()
 
 addEntry ($action, $target, $comment, $params=[], $doer=null)
 
 addRelations ($field, $values, $logid)
 
 getName ()
 
 getDescription ()
 
 getRestriction ()
 
 isRestricted ()
 

Static Public Member Functions

static validTypes ()
 
static isLogType ($type)
 
static actionText ($type, $action, $title=null, $skin=null, $params=[], $filterWikilinks=false)
 
static makeParamBlob ($params)
 
static extractParams ($blob)
 

Public Attributes

const DELETED_ACTION = 1
 
const DELETED_COMMENT = 2
 
const DELETED_USER = 4
 
const DELETED_RESTRICTED = 8
 
const SUPPRESSED_USER = 12
 
const SUPPRESSED_ACTION = 9
 
 $updateRecentChanges
 
 $sendToUDP
 

Protected Member Functions

 saveContent ()
 

Static Protected Member Functions

static getTitleLink ($type, $lang, $title, &$params)
 

Detailed Description

Class to simplify the use of log pages. The logs are now kept in a table which is easier to manage and trim than ever-growing wiki pages.

Constructor & Destructor Documentation

LogPage::__construct (   $type,
  $rc = true,
  $udp = 'skipUDP' 
)
Parameters
string$typeOne of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move'
bool$rcWhether to update recent changes as well as the logging table
string$udpPass 'UDP' to send to the UDP feed if NOT sent to RC

Member Function Documentation

static LogPage::actionText (   $type,
  $action,
  $title = null,
  $skin = null,
  $params = [],
  $filterWikilinks = false 
)
static

Generate text for a log entry. Only LogFormatter should call this function.

Parameters
string$typeLog type
string$actionLog action
Title | null$titleTitle object or null
Skin | null$skinSkin object or null. If null, we want to use the wiki content language, since that will go to the IRC feed.
array$paramsParameters
bool$filterWikilinksWhether to filter wiki links
Returns
string HTML
LogPage::addEntry (   $action,
  $target,
  $comment,
  $params = [],
  $doer = null 
)

Add a log entry

Parameters
string$actionOne of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir'
Title$target
string$commentDescription associated
array$paramsParameters passed later to wfMessage function
null | int | User$doerThe user doing the action. null for $wgUser
Returns
int The log_id of the inserted log entry
LogPage::addRelations (   $field,
  $values,
  $logid 
)

Add relations to log_search table

Parameters
string$field
array$values
int$logid
Returns
bool
static LogPage::extractParams (   $blob)
static

Extract a parameter array from a blob

Parameters
string$blob
Returns
array
LogPage::getComment ( )

Get the comment from the last addEntry() call

Returns
string
LogPage::getDescription ( )

Description of this log type.

Returns
Message
Since
1.19
LogPage::getName ( )

Name of the log.

Returns
Message
Since
1.19
LogPage::getRcComment ( )

Get the RC comment from the last addEntry() call

Returns
string
LogPage::getRcCommentIRC ( )

Get the RC comment from the last addEntry() call for IRC

Returns
string
LogPage::getRestriction ( )

Returns the right needed to read this log type.

Returns
string
Since
1.19
static LogPage::getTitleLink (   $type,
  $lang,
  $title,
$params 
)
staticprotected
Todo:
Document
Parameters
string$type
Language | null$lang
Title$title
array&$params
Returns
string
static LogPage::isLogType (   $type)
static

Is $type a valid log type

Parameters
string$typeLog type to check
Returns
bool
LogPage::isRestricted ( )

Tells if this log is not viewable by all.

Returns
bool
Since
1.19
static LogPage::makeParamBlob (   $params)
static

Create a blob from a parameter array

Parameters
array$params
Returns
string
LogPage::saveContent ( )
protected
Returns
int The log_id of the inserted log entry
static LogPage::validTypes ( )
static

Get the list of valid log types

Returns
array Array of strings

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