Public Member Functions | |
__construct ($type, $rc=true, $udp= 'skipUDP') | |
Constructor. | |
getRcComment () | |
Get the RC comment from the last addEntry() call. | |
getComment () | |
Get the comment from the last addEntry() call. | |
addEntry ($action, $target, $comment, $params=array(), $doer=null) | |
Add a log entry. | |
Static Public Member Functions | |
static | validTypes () |
static | isLogType ($type) |
static | logName ($type) |
static | logHeader ($type) |
static | actionText ($type, $action, $title=NULL, $skin=NULL, $params=array(), $filterWikilinks=false) |
static | makeParamBlob ($params) |
Create a blob from a parameter array. | |
static | extractParams ($blob) |
Extract a parameter array from a blob. | |
static | formatBlockFlags ($flags, $forContent=false) |
Convert a comma-delimited list of block log flags into a more readable (and translated) form. | |
static | formatBlockFlag ($flag, $forContent=false) |
Translate a block log flag if possible. | |
Public Attributes | |
const | DELETED_ACTION = 1 |
const | DELETED_COMMENT = 2 |
const | DELETED_USER = 4 |
const | DELETED_RESTRICTED = 8 |
$type | |
$action | |
$comment | |
$params | |
$target | |
$doer | |
$updateRecentChanges | |
$sendToUDP | |
Protected Member Functions | |
saveContent () | |
Static Protected Member Functions | |
static | getTitleLink ($type, $skin, $title, &$params) |
The logs are now kept in a table which is easier to manage and trim than ever-growing wiki pages.
Definition at line 32 of file LogPage.php.
LogPage::__construct | ( | $ | type, | |
$ | rc = true , |
|||
$ | udp = 'skipUDP' | |||
) |
Constructor.
string | $type One of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move' | |
bool | $rc Whether to update recent changes as well as the logging table | |
bool | $udp Whether to send to the UDP feed if NOT sent to RC |
Definition at line 50 of file LogPage.php.
References $type.
static LogPage::actionText | ( | $ | type, | |
$ | action, | |||
$ | title = NULL , |
|||
$ | skin = NULL , |
|||
$ | params = array() , |
|||
$ | filterWikilinks = false | |||
) | [static] |
Definition at line 163 of file LogPage.php.
References $args, $key, $params, $title, $type, $wgContLang, $wgLang, $wgLogActions, $wgLogActionsHandlers, $wgMessageCache, formatBlockFlags(), getTitleLink(), PatrolLog::makeActionText(), wfDebug(), wfMsg(), wfMsgForContent(), and wfMsgReal().
Referenced by addEntry(), FeedUtils::formatDiff(), getRcComment(), SpecialRevisionDelete::logLine(), LogEventsList::logLine(), LogImporter::makeLineRegexp(), and EnhancedChangesList::recentChangesBlockLine().
LogPage::addEntry | ( | $ | action, | |
$ | target, | |||
$ | comment, | |||
$ | params = array() , |
|||
$ | doer = null | |||
) |
Add a log entry.
string | $action one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir' | |
object | &$target A title object. | |
string | $comment Description associated | |
array | $params Parameters passed later to wfMsg.* functions | |
User | $doer The user doing the action |
Definition at line 323 of file LogPage.php.
References $action, $comment, $doer, $params, $target, $wgUser, actionText(), makeParamBlob(), User::newFromId(), and saveContent().
static LogPage::extractParams | ( | $ | blob | ) | [static] |
Extract a parameter array from a blob.
Definition at line 359 of file LogPage.php.
References $blob.
Referenced by FeedUtils::formatDiff(), ChangesList::insertAction(), SpecialRevisionDelete::logLine(), LogEventsList::logLine(), and EnhancedChangesList::recentChangesBlockLine().
static LogPage::formatBlockFlag | ( | $ | flag, | |
$ | forContent = false | |||
) | [static] |
Translate a block log flag if possible.
$flag | Flag to translate | |
$forContent | Whether to localize the message depending of the user language |
Definition at line 397 of file LogPage.php.
References $messages, $msg, wfEmptyMsg(), wfMsg(), and wfMsgForContent().
static LogPage::formatBlockFlags | ( | $ | flags, | |
$ | forContent = false | |||
) | [static] |
Convert a comma-delimited list of block log flags into a more readable (and translated) form.
$flags | Flags to format | |
$forContent | Whether to localize the message depending of the user language |
Definition at line 376 of file LogPage.php.
References $flags, $i, and $wgLang.
Referenced by actionText().
LogPage::getComment | ( | ) |
LogPage::getRcComment | ( | ) |
Get the RC comment from the last addEntry() call.
Definition at line 100 of file LogPage.php.
References actionText(), and wfMsgForContent().
Referenced by saveContent().
static LogPage::getTitleLink | ( | $ | type, | |
$ | skin, | |||
$ | title, | |||
&$ | params | |||
) | [static, protected] |
Definition at line 262 of file LogPage.php.
References $name, $params, $text, $title, $type, $wgContLang, $wgLang, User::idFromName(), logName(), Title::makeTitle(), Title::newFromText(), SpecialPage::resolveAliasWithSubpage(), and Linker::TOOL_LINKS_NOBLOCK.
Referenced by actionText().
static LogPage::isLogType | ( | $ | type | ) | [static] |
Definition at line 129 of file LogPage.php.
References $type, and validTypes().
Referenced by LogEventsList::showHeader().
static LogPage::logHeader | ( | $ | type | ) | [static] |
string | $type logtype |
Definition at line 153 of file LogPage.php.
References $type, $wgLogHeaders, $wgMessageCache, and wfMsgExt().
Referenced by LogEventsList::showHeader().
static LogPage::logName | ( | $ | type | ) | [static] |
Definition at line 136 of file LogPage.php.
References $type, $wgLogNames, $wgMessageCache, and wfMsg().
Referenced by Article::delete(), Article::doDelete(), SpecialRevisionDelete::execute(), getTitleLink(), LogEventsList::getTypeMenu(), ChangesList::insertLog(), EnhancedChangesList::recentChangesBlockLine(), EnhancedChangesList::recentChangesLine(), LogEventsList::showHeader(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), FileDeleteForm::showLogEntries(), ProtectionForm::showLogExtract(), UserrightsPage::showLogFragment(), MovePageForm::showLogFragment(), and IPBlockForm::showLogFragment().
static LogPage::makeParamBlob | ( | $ | params | ) | [static] |
Create a blob from a parameter array.
Definition at line 351 of file LogPage.php.
References $params.
Referenced by addEntry().
LogPage::saveContent | ( | ) | [protected] |
Definition at line 56 of file LogPage.php.
References $dbw, $wgLogRestrictions, getRcComment(), SpecialPage::getTitleFor(), RecentChange::newLogEntry(), RecentChange::notifyLog(), wfGetDB(), and wfTimestampNow().
Referenced by addEntry().
static LogPage::validTypes | ( | ) | [static] |
Definition at line 121 of file LogPage.php.
References $wgLogTypes.
Referenced by LogEventsList::getTypeMenu(), and isLogType().
LogPage::$action |
LogPage::$comment |
LogPage::$doer |
LogPage::$params |
Definition at line 38 of file LogPage.php.
Referenced by actionText(), addEntry(), getTitleLink(), and makeParamBlob().
LogPage::$sendToUDP |
Definition at line 40 of file LogPage.php.
LogPage::$target |
LogPage::$type |
Definition at line 38 of file LogPage.php.
Referenced by __construct(), actionText(), getTitleLink(), isLogType(), logHeader(), and logName().
LogPage::$updateRecentChanges |
Definition at line 40 of file LogPage.php.
const LogPage::DELETED_ACTION = 1 |
Definition at line 33 of file LogPage.php.
Referenced by ApiQueryLogEvents::execute(), ApiQueryLogEvents::extractRowInfo(), FeedUtils::formatDiff(), ChangesList::insertAction(), LogPager::limitTitle(), SpecialRevisionDelete::logLine(), LogEventsList::logLine(), EnhancedChangesList::recentChangesBlockGroup(), EnhancedChangesList::recentChangesBlockLine(), SpecialRevisionDelete::secureOperation(), IPBlockForm::setUsernameBitfields(), and XmlDumpWriter::writeLogItem().
const LogPage::DELETED_COMMENT = 2 |
Definition at line 34 of file LogPage.php.
Referenced by ApiQueryLogEvents::extractRowInfo(), EditPage::getLastDelete(), SpecialRevisionDelete::logLine(), LogEventsList::logLine(), and XmlDumpWriter::writeLogItem().
const LogPage::DELETED_RESTRICTED = 8 |
Definition at line 36 of file LogPage.php.
Referenced by LogEventsList::getShowHideLinks(), RevisionDeleter::setEventVisibility(), and LogEventsList::userCan().
const LogPage::DELETED_USER = 4 |
Definition at line 35 of file LogPage.php.
Referenced by ApiQueryLogEvents::execute(), ApiQueryLogEvents::extractRowInfo(), EditPage::getLastDelete(), LogPager::limitUser(), SpecialRevisionDelete::logLine(), LogEventsList::logLine(), and XmlDumpWriter::writeLogItem().