MediaWiki  1.23.8
LogPage.php
Go to the documentation of this file.
1 <?php
32 class LogPage {
33  const DELETED_ACTION = 1;
34  const DELETED_COMMENT = 2;
35  const DELETED_USER = 4;
36  const DELETED_RESTRICTED = 8;
37 
38  // Convenience fields
39  const SUPPRESSED_USER = 12;
40  const SUPPRESSED_ACTION = 9;
41 
43  public $updateRecentChanges;
44 
46  public $sendToUDP;
47 
49  private $ircActionText;
50 
52  private $actionText;
53 
57  private $type;
58 
61  private $action;
62 
64  private $comment;
65 
67  private $params;
68 
70  private $doer;
71 
73  private $target;
74 
83  public function __construct( $type, $rc = true, $udp = 'skipUDP' ) {
84  $this->type = $type;
85  $this->updateRecentChanges = $rc;
86  $this->sendToUDP = ( $udp == 'UDP' );
87  }
88 
92  protected function saveContent() {
93  global $wgLogRestrictions;
94 
95  $dbw = wfGetDB( DB_MASTER );
96  $log_id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
97 
98  // @todo FIXME private/protected/public property?
99  $this->timestamp = $now = wfTimestampNow();
100  $data = array(
101  'log_id' => $log_id,
102  'log_type' => $this->type,
103  'log_action' => $this->action,
104  'log_timestamp' => $dbw->timestamp( $now ),
105  'log_user' => $this->doer->getId(),
106  'log_user_text' => $this->doer->getName(),
107  'log_namespace' => $this->target->getNamespace(),
108  'log_title' => $this->target->getDBkey(),
109  'log_page' => $this->target->getArticleID(),
110  'log_comment' => $this->comment,
111  'log_params' => $this->params
112  );
113  $dbw->insert( 'logging', $data, __METHOD__ );
114  $newId = !is_null( $log_id ) ? $log_id : $dbw->insertId();
115 
116  # And update recentchanges
117  if ( $this->updateRecentChanges ) {
118  $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
119 
121  $now, $titleObj, $this->doer, $this->getRcComment(), '',
122  $this->type, $this->action, $this->target, $this->comment,
123  $this->params, $newId, $this->getRcCommentIRC()
124  );
125  } elseif ( $this->sendToUDP ) {
126  # Don't send private logs to UDP
127  if ( isset( $wgLogRestrictions[$this->type] ) && $wgLogRestrictions[$this->type] != '*' ) {
128  return $newId;
129  }
130 
131  # Notify external application via UDP.
132  # We send this to IRC but do not want to add it the RC table.
133  $titleObj = SpecialPage::getTitleFor( 'Log', $this->type );
135  $now, $titleObj, $this->doer, $this->getRcComment(), '',
136  $this->type, $this->action, $this->target, $this->comment,
137  $this->params, $newId, $this->getRcCommentIRC()
138  );
139  $rc->notifyRCFeeds();
140  }
141 
142  return $newId;
143  }
144 
150  public function getRcComment() {
151  $rcComment = $this->actionText;
152 
153  if ( $this->comment != '' ) {
154  if ( $rcComment == '' ) {
155  $rcComment = $this->comment;
156  } else {
157  $rcComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() .
159  }
160  }
161 
162  return $rcComment;
163  }
164 
170  public function getRcCommentIRC() {
171  $rcComment = $this->ircActionText;
172 
173  if ( $this->comment != '' ) {
174  if ( $rcComment == '' ) {
175  $rcComment = $this->comment;
176  } else {
177  $rcComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() .
179  }
180  }
181 
182  return $rcComment;
183  }
184 
188  public function getComment() {
189  return $this->comment;
190  }
191 
197  public static function validTypes() {
198  global $wgLogTypes;
199 
200  return $wgLogTypes;
201  }
202 
209  public static function isLogType( $type ) {
210  return in_array( $type, LogPage::validTypes() );
211  }
212 
220  public static function logName( $type ) {
221  global $wgLogNames;
222 
223  wfDeprecated( __METHOD__, '1.21' );
224 
225  if ( isset( $wgLogNames[$type] ) ) {
226  return str_replace( '_', ' ', wfMessage( $wgLogNames[$type] )->text() );
227  } else {
228  // Bogus log types? Perhaps an extension was removed.
229  return $type;
230  }
231  }
232 
241  public static function logHeader( $type ) {
242  global $wgLogHeaders;
243 
244  wfDeprecated( __METHOD__, '1.21' );
245 
246  return wfMessage( $wgLogHeaders[$type] )->parse();
247  }
248 
262  public static function actionText( $type, $action, $title = null, $skin = null,
263  $params = array(), $filterWikilinks = false
264  ) {
265  global $wgLang, $wgContLang, $wgLogActions;
266 
267  if ( is_null( $skin ) ) {
268  $langObj = $wgContLang;
269  $langObjOrNull = null;
270  } else {
271  $langObj = $wgLang;
272  $langObjOrNull = $wgLang;
273  }
274 
275  $key = "$type/$action";
276 
277  if ( isset( $wgLogActions[$key] ) ) {
278  if ( is_null( $title ) ) {
279  $rv = wfMessage( $wgLogActions[$key] )->inLanguage( $langObj )->escaped();
280  } else {
281  $titleLink = self::getTitleLink( $type, $langObjOrNull, $title, $params );
282 
283  if ( count( $params ) == 0 ) {
284  $rv = wfMessage( $wgLogActions[$key] )->rawParams( $titleLink )
285  ->inLanguage( $langObj )->escaped();
286  } else {
287  $details = '';
288  array_unshift( $params, $titleLink );
289 
290  // User suppression
291  if ( preg_match( '/^(block|suppress)\/(block|reblock)$/', $key ) ) {
292  if ( $skin ) {
293  // Localize the duration, and add a tooltip
294  // in English to help visitors from other wikis.
295  // The lrm is needed to make sure that the number
296  // is shown on the correct side of the tooltip text.
297  $durationTooltip = '&lrm;' . htmlspecialchars( $params[1] );
298  $params[1] = "<span class='blockExpiry' title='$durationTooltip'>" .
299  $wgLang->translateBlockExpiry( $params[1] ) . '</span>';
300  } else {
301  $params[1] = $wgContLang->translateBlockExpiry( $params[1] );
302  }
303 
304  $params[2] = isset( $params[2] ) ?
305  self::formatBlockFlags( $params[2], $langObj ) : '';
306  // Page protections
307  } elseif ( $type == 'protect' && count( $params ) == 3 ) {
308  // Restrictions and expiries
309  if ( $skin ) {
310  $details .= $wgLang->getDirMark() . htmlspecialchars( " {$params[1]}" );
311  } else {
312  $details .= " {$params[1]}";
313  }
314 
315  // Cascading flag...
316  if ( $params[2] ) {
317  $text = wfMessage( 'protect-summary-cascade' )
318  ->inLanguage( $langObj )->text();
319  $details .= ' ';
320  $details .= wfMessage( 'brackets', $text )->inLanguage( $langObj )->text();
321 
322  }
323  }
324 
325  $rv = wfMessage( $wgLogActions[$key] )->rawParams( $params )
326  ->inLanguage( $langObj )->escaped() . $details;
327  }
328  }
329  } else {
330  global $wgLogActionsHandlers;
331 
332  if ( isset( $wgLogActionsHandlers[$key] ) ) {
333  $args = func_get_args();
334  $rv = call_user_func_array( $wgLogActionsHandlers[$key], $args );
335  } else {
336  wfDebug( "LogPage::actionText - unknown action $key\n" );
337  $rv = "$action";
338  }
339  }
340 
341  // For the perplexed, this feature was added in r7855 by Erik.
342  // The feature was added because we liked adding [[$1]] in our log entries
343  // but the log entries are parsed as Wikitext on RecentChanges but as HTML
344  // on Special:Log. The hack is essentially that [[$1]] represented a link
345  // to the title in question. The first parameter to the HTML version (Special:Log)
346  // is that link in HTML form, and so this just gets rid of the ugly [[]].
347  // However, this is a horrible hack and it doesn't work like you expect if, say,
348  // you want to link to something OTHER than the title of the log entry.
349  // The real problem, which Erik was trying to fix (and it sort-of works now) is
350  // that the same messages are being treated as both wikitext *and* HTML.
351  if ( $filterWikilinks ) {
352  $rv = str_replace( '[[', '', $rv );
353  $rv = str_replace( ']]', '', $rv );
354  }
355 
356  return $rv;
357  }
358 
367  protected static function getTitleLink( $type, $lang, $title, &$params ) {
368  if ( !$lang ) {
369  return $title->getPrefixedText();
370  }
371 
372  switch ( $type ) {
373  case 'move':
374  $titleLink = Linker::link(
375  $title,
376  htmlspecialchars( $title->getPrefixedText() ),
377  array(),
378  array( 'redirect' => 'no' )
379  );
380 
381  $targetTitle = Title::newFromText( $params[0] );
382 
383  if ( !$targetTitle ) {
384  # Workaround for broken database
385  $params[0] = htmlspecialchars( $params[0] );
386  } else {
387  $params[0] = Linker::link(
388  $targetTitle,
389  htmlspecialchars( $params[0] )
390  );
391  }
392  break;
393  case 'block':
394  if ( substr( $title->getText(), 0, 1 ) == '#' ) {
395  $titleLink = $title->getText();
396  } else {
397  // @todo Store the user identifier in the parameters
398  // to make this faster for future log entries
399  $id = User::idFromName( $title->getText() );
400  $titleLink = Linker::userLink( $id, $title->getText() )
401  . Linker::userToolLinks( $id, $title->getText(), false, Linker::TOOL_LINKS_NOBLOCK );
402  }
403  break;
404  case 'merge':
405  $titleLink = Linker::link(
406  $title,
407  $title->getPrefixedText(),
408  array(),
409  array( 'redirect' => 'no' )
410  );
411  $params[0] = Linker::link(
413  htmlspecialchars( $params[0] )
414  );
415  $params[1] = $lang->timeanddate( $params[1] );
416  break;
417  default:
418  if ( $title->isSpecialPage() ) {
419  list( $name, $par ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
420 
421  # Use the language name for log titles, rather than Log/X
422  if ( $name == 'Log' ) {
423  $logPage = new LogPage( $par );
424  $titleLink = Linker::link( $title, $logPage->getName()->escaped() );
425  $titleLink = wfMessage( 'parentheses' )
426  ->inLanguage( $lang )
427  ->rawParams( $titleLink )
428  ->escaped();
429  } else {
430  $titleLink = Linker::link( $title );
431  }
432  } else {
433  $titleLink = Linker::link( $title );
434  }
435  }
436 
437  return $titleLink;
438  }
439 
452  public function addEntry( $action, $target, $comment, $params = array(), $doer = null ) {
454 
455  if ( !is_array( $params ) ) {
456  $params = array( $params );
457  }
458 
459  if ( $comment === null ) {
460  $comment = '';
461  }
462 
463  # Trim spaces on user supplied text
464  $comment = trim( $comment );
465 
466  # Truncate for whole multibyte characters.
467  $comment = $wgContLang->truncate( $comment, 255 );
468 
469  $this->action = $action;
470  $this->target = $target;
471  $this->comment = $comment;
472  $this->params = LogPage::makeParamBlob( $params );
473 
474  if ( $doer === null ) {
475  global $wgUser;
476  $doer = $wgUser;
477  } elseif ( !is_object( $doer ) ) {
479  }
480 
481  $this->doer = $doer;
482 
483  $logEntry = new ManualLogEntry( $this->type, $action );
484  $logEntry->setTarget( $target );
485  $logEntry->setPerformer( $doer );
486  $logEntry->setParameters( $params );
487 
488  $formatter = LogFormatter::newFromEntry( $logEntry );
490  $formatter->setContext( $context );
491 
492  $this->actionText = $formatter->getPlainActionText();
493  $this->ircActionText = $formatter->getIRCActionText();
494 
495  return $this->saveContent();
496  }
497 
506  public function addRelations( $field, $values, $logid ) {
507  if ( !strlen( $field ) || empty( $values ) ) {
508  return false; // nothing
509  }
510 
511  $data = array();
512 
513  foreach ( $values as $value ) {
514  $data[] = array(
515  'ls_field' => $field,
516  'ls_value' => $value,
517  'ls_log_id' => $logid
518  );
519  }
520 
521  $dbw = wfGetDB( DB_MASTER );
522  $dbw->insert( 'log_search', $data, __METHOD__, 'IGNORE' );
523 
524  return true;
525  }
526 
533  public static function makeParamBlob( $params ) {
534  return implode( "\n", $params );
535  }
536 
543  public static function extractParams( $blob ) {
544  if ( $blob === '' ) {
545  return array();
546  } else {
547  return explode( "\n", $blob );
548  }
549  }
550 
559  public static function formatBlockFlags( $flags, $lang ) {
560  $flags = trim( $flags );
561  if ( $flags === '' ) {
562  return ''; //nothing to do
563  }
564  $flags = explode( ',', $flags );
565  $flagsCount = count( $flags );
566 
567  for ( $i = 0; $i < $flagsCount; $i++ ) {
568  $flags[$i] = self::formatBlockFlag( $flags[$i], $lang );
569  }
570 
571  return wfMessage( 'parentheses' )->inLanguage( $lang )
572  ->rawParams( $lang->commaList( $flags ) )->escaped();
573  }
574 
582  public static function formatBlockFlag( $flag, $lang ) {
583  static $messages = array();
584 
585  if ( !isset( $messages[$flag] ) ) {
586  $messages[$flag] = htmlspecialchars( $flag ); // Fallback
587 
588  // For grepping. The following core messages can be used here:
589  // * block-log-flags-angry-autoblock
590  // * block-log-flags-anononly
591  // * block-log-flags-hiddenname
592  // * block-log-flags-noautoblock
593  // * block-log-flags-nocreate
594  // * block-log-flags-noemail
595  // * block-log-flags-nousertalk
596  $msg = wfMessage( 'block-log-flags-' . $flag )->inLanguage( $lang );
597 
598  if ( $msg->exists() ) {
599  $messages[$flag] = $msg->escaped();
600  }
601  }
602 
603  return $messages[$flag];
604  }
605 
611  public function getName() {
612  global $wgLogNames;
613 
614  // BC
615  if ( isset( $wgLogNames[$this->type] ) ) {
616  $key = $wgLogNames[$this->type];
617  } else {
618  $key = 'log-name-' . $this->type;
619  }
620 
621  return wfMessage( $key );
622  }
623 
629  public function getDescription() {
630  global $wgLogHeaders;
631  // BC
632  if ( isset( $wgLogHeaders[$this->type] ) ) {
633  $key = $wgLogHeaders[$this->type];
634  } else {
635  $key = 'log-description-' . $this->type;
636  }
637 
638  return wfMessage( $key );
639  }
640 
646  public function getRestriction() {
647  global $wgLogRestrictions;
648  if ( isset( $wgLogRestrictions[$this->type] ) ) {
649  $restriction = $wgLogRestrictions[$this->type];
650  } else {
651  // '' always returns true with $user->isAllowed()
652  $restriction = '';
653  }
654 
655  return $restriction;
656  }
657 
663  public function isRestricted() {
664  $restriction = $this->getRestriction();
665 
666  return $restriction !== '' && $restriction !== '*';
667  }
668 }
$wgUser
$wgUser
Definition: Setup.php:552
LogPage\SUPPRESSED_ACTION
const SUPPRESSED_ACTION
Definition: LogPage.php:40
User\newFromId
static newFromId( $id)
Static factory method for creation from a given user ID.
Definition: User.php:412
Title\newFromText
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
Definition: Title.php:189
DB_MASTER
const DB_MASTER
Definition: Defines.php:56
LogPage\SUPPRESSED_USER
const SUPPRESSED_USER
Definition: LogPage.php:39
LogPage\validTypes
static validTypes()
Get the list of valid log types.
Definition: LogPage.php:187
Linker\TOOL_LINKS_NOBLOCK
const TOOL_LINKS_NOBLOCK
Flags for userToolLinks()
Definition: Linker.php:37
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
LogPage\getTitleLink
static getTitleLink( $type, $lang, $title, &$params)
Definition: LogPage.php:357
Linker\userLink
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition: Linker.php:1072
LogPage\formatBlockFlags
static formatBlockFlags( $flags, $lang)
Convert a comma-delimited list of block log flags into a more readable (and translated) form.
Definition: LogPage.php:549
LogPage\extractParams
static extractParams( $blob)
Extract a parameter array from a blob.
Definition: LogPage.php:533
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3659
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
RecentChange\newLogEntry
static newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='')
Definition: RecentChange.php:656
LogPage\isRestricted
isRestricted()
Tells if this log is not viewable by all.
Definition: LogPage.php:653
LogPage\$params
string $params
Blob made of a parameters array *.
Definition: LogPage.php:59
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
$wgContLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
Definition: design.txt:56
$flags
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition: hooks.txt:2113
$messages
$messages
Definition: LogTests.i18n.php:8
LogPage\__construct
__construct( $type, $rc=true, $udp='skipUDP')
Constructor.
Definition: LogPage.php:73
Linker\link
static link( $target, $html=null, $customAttribs=array(), $query=array(), $options=array())
This function returns an HTML link to the given target.
Definition: Linker.php:192
LogPage\getRestriction
getRestriction()
Returns the right needed to read this log type.
Definition: LogPage.php:636
LogPage\getComment
getComment()
Get the comment from the last addEntry() call.
Definition: LogPage.php:178
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Definition: GlobalFunctions.php:1127
LogPage\DELETED_COMMENT
const DELETED_COMMENT
Definition: LogPage.php:34
$blob
$blob
Definition: testCompression.php:61
LogPage\DELETED_USER
const DELETED_USER
Definition: LogPage.php:35
LogPage\formatBlockFlag
static formatBlockFlag( $flag, $lang)
Translate a block log flag if possible.
Definition: LogPage.php:572
LogPage\isLogType
static isLogType( $type)
Is $type a valid log type.
Definition: LogPage.php:199
LogPage\getDescription
getDescription()
Description of this log type.
Definition: LogPage.php:619
LogPage
Class to simplify the use of log pages.
Definition: LogPage.php:32
wfMessage
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "&lt
LogPage\getName
getName()
Name of the log.
Definition: LogPage.php:601
RequestContext\newExtraneousContext
static newExtraneousContext(Title $title, $request=array())
Create a new extraneous context.
Definition: RequestContext.php:535
RecentChange\notifyLog
static notifyLog( $timestamp, &$title, &$user, $actionComment, $ip, $type, $action, $target, $logComment, $params, $newId=0, $actionCommentIRC='')
Definition: RecentChange.php:625
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
LogPage\getRcCommentIRC
getRcCommentIRC()
Get the RC comment from the last addEntry() call for IRC.
Definition: LogPage.php:160
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
wfTimestampNow
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Definition: GlobalFunctions.php:2514
LogPage\actionText
static actionText( $type, $action, $title=null, $skin=null, $params=array(), $filterWikilinks=false)
Generate text for a log entry.
Definition: LogPage.php:252
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
LogPage\DELETED_ACTION
const DELETED_ACTION
Definition: LogPage.php:33
LogPage\addEntry
addEntry( $action, $target, $comment, $params=array(), $doer=null)
Add a log entry.
Definition: LogPage.php:442
LogPage\$action
string $action
One of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir' *.
Definition: LogPage.php:55
wfDebug
wfDebug( $text, $dest='all')
Sends a line to the debug log if enabled or, optionally, to a comment in output.
Definition: GlobalFunctions.php:933
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
action
action
Definition: parserTests.txt:378
$value
$value
Definition: styleTest.css.php:45
Linker\userToolLinks
static userToolLinks( $userId, $userText, $redContribsWhenNoEdits=false, $flags=0, $edits=null)
Generate standard user tool links (talk, contributions, block link, etc.)
Definition: Linker.php:1100
LogPage\$comment
string $comment
Comment associated with action *.
Definition: LogPage.php:57
LogPage\makeParamBlob
static makeParamBlob( $params)
Create a blob from a parameter array.
Definition: LogPage.php:523
LogPage\$doer
User $doer
The user doing the action *.
Definition: LogPage.php:61
LogPage\$sendToUDP
bool $sendToUDP
Definition: LogPage.php:44
LogPage\getRcComment
getRcComment()
Get the RC comment from the last addEntry() call.
Definition: LogPage.php:140
SpecialPageFactory\resolveAlias
static resolveAlias( $alias)
Given a special page name with a possible subpage, return an array where the first element is the spe...
Definition: SpecialPageFactory.php:271
LogPage\saveContent
saveContent()
Definition: LogPage.php:82
LogPage\$type
string $type
One of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move'.
Definition: LogPage.php:52
LogPage\addRelations
addRelations( $field, $values, $logid)
Add relations to log_search table.
Definition: LogPage.php:496
$skin
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned $skin
Definition: hooks.txt:1530
LogPage\logHeader
static logHeader( $type)
Get the log header for the given log type.
Definition: LogPage.php:231
LogPage\$ircActionText
string $ircActionText
Plaintext version of the message for IRC *.
Definition: LogPage.php:46
$args
if( $line===false) $args
Definition: cdb.php:62
Title
Represents a title within MediaWiki.
Definition: Title.php:35
$wgLang
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
Definition: design.txt:56
User\idFromName
static idFromName( $name)
Get database id given a user name.
Definition: User.php:503
type
This document describes the state of Postgres support in and is fairly well maintained The main code is very well while extensions are very hit and miss it is probably the most supported database after MySQL Much of the work in making MediaWiki database agnostic came about through the work of creating Postgres as and are nearing end of but without copying over all the usage comments General notes on the but these can almost always be programmed around *Although Postgres has a true BOOLEAN type
Definition: postgres.txt:22
LogPage\$actionText
string $actionText
Plaintext version of the message *.
Definition: LogPage.php:48
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
ManualLogEntry
Class for creating log entries manually, for example to inject them into the database.
Definition: LogEntry.php:339
LogPage\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: LogPage.php:36
LogPage\logName
static logName( $type)
Get the name for the given log type.
Definition: LogPage.php:210
LogPage\$updateRecentChanges
bool $updateRecentChanges
Definition: LogPage.php:42
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
LogPage\$target
Title $target
Definition: LogPage.php:63
LogFormatter\newFromEntry
static newFromEntry(LogEntry $entry)
Constructs a new formatter suitable for given entry.
Definition: LogFormatter.php:45