LogEventsList Class Reference

List of all members.

Public Member Functions

 __construct ($skin, $out, $flags=0)
 showHeader ($type)
 Set page title and show header for this log type.
 showOptions ($types=array(), $user='', $page='', $pattern='', $year='', $month= '', $filter=null, $tagFilter='')
 Show options for the log list.
 beginLogEventsList ()
 endLogEventsList ()
 logLine ($row)

Static Public Member Functions

static typeAction ($row, $type, $action, $right='')
static userCan ($row, $field)
 Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.
static userCanBitfield ($bitfield, $field)
 Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.
static isDeleted ($row, $field)
static showLogExtract (&$out, $types=array(), $page='', $user='', $param=array())
 Show log extract.
static getExcludeClause ($db, $audience= 'public')
 SQL clause to skip forbidden log types for this user.

Public Attributes

const NO_ACTION_LINK = 1
 $flags

Private Member Functions

 preCacheMessages ()
 As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.
 getFilterLinks ($filter)
 getDefaultQuery ()
 getTypeMenu ($queryTypes)
 getUserInput ($user)
 getTitleInput ($title)
 getTitlePattern ($pattern)
 getExtraInputs ($types)
 getShowHideLinks ($row)

Private Attributes

 $skin
 $out


Detailed Description

Definition at line 20 of file LogEventsList.php.


Constructor & Destructor Documentation

LogEventsList::__construct ( skin,
out,
flags = 0 
)

Definition at line 27 of file LogEventsList.php.

References $flags, $out, $skin, and preCacheMessages().

Referenced by LogPager::__construct().


Member Function Documentation

LogEventsList::beginLogEventsList (  ) 

Definition at line 261 of file LogEventsList.php.

Referenced by wfSpecialLog().

LogEventsList::endLogEventsList (  ) 

Definition at line 265 of file LogEventsList.php.

LogEventsList::getDefaultQuery (  )  [private]

Definition at line 164 of file LogEventsList.php.

Referenced by LogPager::getDefaultQuery(), and getFilterLinks().

static LogEventsList::getExcludeClause ( db,
audience = 'public' 
) [static]

SQL clause to skip forbidden log types for this user.

Parameters:
$db Database
$audience string, public/user
Returns:
mixed (string or false)

Definition at line 708 of file LogEventsList.php.

Referenced by WikiExporter::dumpFrom(), ApiQueryLogEvents::execute(), and LogPager::limitType().

LogEventsList::getExtraInputs ( types  )  [private]

Definition at line 247 of file LogEventsList.php.

References $wgRequest, Xml::inputLabel(), IP::isIPAddress(), User::newFromName(), and wfMsg().

Referenced by showOptions().

LogEventsList::getFilterLinks ( filter  )  [private]

Parameters:
$filter Array
Returns:
String: Formatted HTML

Definition at line 133 of file LogEventsList.php.

References $messages, $wgLang, $wgTitle, getDefaultQuery(), Xml::hidden(), and wfMsgHtml().

Referenced by showOptions().

LogEventsList::getShowHideLinks ( row  )  [private]

Parameters:
$row Row
Returns:
string

Definition at line 509 of file LogEventsList.php.

References $page, $wgUser, LogPage::DELETED_RESTRICTED, SpecialPage::getTitleFor(), and Title::makeTitle().

Referenced by logLine().

LogEventsList::getTitleInput ( title  )  [private]

Parameters:
$title String
Returns:
String: Formatted HTML

Definition at line 232 of file LogEventsList.php.

References $title, Xml::inputLabel(), and wfMsg().

Referenced by showOptions().

LogEventsList::getTitlePattern ( pattern  )  [private]

Returns:
boolean Checkbox

Definition at line 241 of file LogEventsList.php.

References Xml::checkLabel(), and wfMsg().

Referenced by showOptions().

LogEventsList::getTypeMenu ( queryTypes  )  [private]

Parameters:
$queryTypes Array
Returns:
String: Formatted HTML

Definition at line 182 of file LogEventsList.php.

References $wgLogRestrictions, $wgUser, LogPage::logName(), Xml::option(), and LogPage::validTypes().

Referenced by showOptions().

LogEventsList::getUserInput ( user  )  [private]

Parameters:
$user String
Returns:
String: Formatted HTML

Definition at line 222 of file LogEventsList.php.

References Xml::inputLabel(), and wfMsg().

Referenced by showOptions().

static LogEventsList::isDeleted ( row,
field 
) [static]

Parameters:
$row Row
$field Integer: one of DELETED_* bitfield constants
Returns:
Boolean

Definition at line 592 of file LogEventsList.php.

Referenced by ApiQueryLogEvents::extractRowInfo(), and RevDel_LogItem::getHTML().

LogEventsList::logLine ( row  ) 

LogEventsList::preCacheMessages (  )  [private]

As we use the same small set of messages in various methods and that they are called often, we call them once and save them in $this->message.

Definition at line 38 of file LogEventsList.php.

References $messages, $msg, and wfMsgExt().

Referenced by __construct().

LogEventsList::showHeader ( type  ) 

Set page title and show header for this log type.

Parameters:
$type Array

Definition at line 54 of file LogEventsList.php.

References LogPage::isLogType(), LogPage::logHeader(), LogPage::logName(), and wfMsgExt().

static LogEventsList::showLogExtract ( &$  out,
types = array(),
page = '',
user = '',
param = array() 
) [static]

Show log extract.

Either with text and a box (set $msgKey) or without (don't set $msgKey)

Parameters:
$out OutputPage or String-by-reference
$types String or Array
$page String The page title to show log entries for
$user String The user who made the log entries
$param Associative Array with the following additional options:
  • lim Integer Limit of items to show, default is 50
  • conds Array Extra conditions for the query (e.g. "log_action != 'revision'")
  • showIfEmpty boolean Set to false if you don't want any output in case the loglist is empty if set to true (default), "No matching items in log" is displayed if loglist is empty
  • msgKey Array If you want a nice box with a message, set this to the key of the message. First element is the message key, additional optional elements are parameters for the key that are processed with wgMsgExt and option 'parse'
  • offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset
  • wrap String: Wrap the message in html (usually something like "<div ...>$1</div>").
Returns:
Integer Number of total log items (not limited by $lim)

Definition at line 615 of file LogEventsList.php.

References $page, $s, $wgOut, $wgRequest, $wgUser, Html::rawElement(), and wfMsgExt().

Referenced by Article::confirmDelete(), SpecialContributions::contributionsSub(), Article::delete(), Article::doDelete(), SpecialRevisionDelete::execute(), DeletedContributionsPage::getSubTitle(), HistoryPage::history(), MovePageForm::showForm(), EditPage::showHeader(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), EditPage::showIntro(), FileDeleteForm::showLogEntries(), UserrightsPage::showLogFragment(), MovePageForm::showLogFragment(), IPBlockForm::showLogFragment(), and Article::showMissingArticle().

LogEventsList::showOptions ( types = array(),
user = '',
page = '',
pattern = '',
year = '',
month = '',
filter = null,
tagFilter = '' 
)

Show options for the log list.

Parameters:
$types string or Array
$user String
$page String
$pattern String
$year Integer: year
$month Integer: month
$filter,: array
$tagFilter,: array?

Definition at line 76 of file LogEventsList.php.

References $action, $page, $title, $wgMiserMode, $wgScript, ChangeTags::buildTagFilterSelector(), Xml::dateMenu(), Xml::fieldset(), getExtraInputs(), getFilterLinks(), SpecialPage::getTitleFor(), getTitleInput(), getTitlePattern(), getTypeMenu(), getUserInput(), Xml::hidden(), Xml::submitButton(), Xml::tags(), and wfMsg().

static LogEventsList::typeAction ( row,
type,
action,
right = '' 
) [static]

Parameters:
$row Row
$type Mixed: string/array
$action Mixed: string/array
$right string
Returns:
bool

Definition at line 539 of file LogEventsList.php.

References $action, and $wgUser.

Referenced by PopulateLogSearch::execute(), and migrate_log_params().

static LogEventsList::userCan ( row,
field 
) [static]

Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.

Parameters:
$row Row
$field Integer
Returns:
Boolean

Definition at line 560 of file LogEventsList.php.

References userCanBitfield().

Referenced by RevDel_LogItem::canView().

static LogEventsList::userCanBitfield ( bitfield,
field 
) [static]

Determine if the current user is allowed to view a particular field of this log row, if it's marked as deleted.

Parameters:
$bitfield Integer (current field)
$field Integer
Returns:
Boolean

Definition at line 571 of file LogEventsList.php.

References $wgUser, LogPage::DELETED_RESTRICTED, and wfDebug().

Referenced by userCan(), and ChangesList::userCan().


Member Data Documentation

LogEventsList::$flags

Definition at line 25 of file LogEventsList.php.

Referenced by LogViewer::__construct(), and __construct().

LogEventsList::$out [private]

Definition at line 24 of file LogEventsList.php.

Referenced by __construct(), and LogViewer::showList().

LogEventsList::$skin [private]

Definition at line 23 of file LogEventsList.php.

Referenced by __construct().

Definition at line 21 of file LogEventsList.php.


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

Generated on Sat Apr 30 22:57:42 2011 for MediaWiki by  doxygen 1.5.9