MediaWiki  1.23.2
ChangesList.php
Go to the documentation of this file.
1 <?php
25 class ChangesList extends ContextSource {
29  public $skin;
30 
31  protected $watchlist = false;
32  protected $lastdate;
33  protected $message;
34  protected $rc_cache;
35  protected $rcCacheIndex;
36  protected $rclistOpen;
37  protected $rcMoveIndex;
38 
44  public function __construct( $obj ) {
45  if ( $obj instanceof IContextSource ) {
46  $this->setContext( $obj );
47  $this->skin = $obj->getSkin();
48  } else {
49  $this->setContext( $obj->getContext() );
50  $this->skin = $obj;
51  }
52  $this->preCacheMessages();
53  }
54 
62  public static function newFromContext( IContextSource $context ) {
63  $user = $context->getUser();
64  $sk = $context->getSkin();
65  $list = null;
66  if ( wfRunHooks( 'FetchChangesList', array( $user, &$sk, &$list ) ) ) {
67  $new = $context->getRequest()->getBool( 'enhanced', $user->getOption( 'usenewrc' ) );
68 
69  return $new ? new EnhancedChangesList( $context ) : new OldChangesList( $context );
70  } else {
71  return $list;
72  }
73  }
74 
79  public function setWatchlistDivs( $value = true ) {
80  $this->watchlist = $value;
81  }
82 
87  public function isWatchlist() {
88  return (bool)$this->watchlist;
89  }
90 
95  private function preCacheMessages() {
96  if ( !isset( $this->message ) ) {
97  foreach ( array(
98  'cur', 'diff', 'hist', 'enhancedrc-history', 'last', 'blocklink', 'history',
99  'semicolon-separator', 'pipe-separator' ) as $msg
100  ) {
101  $this->message[$msg] = $this->msg( $msg )->escaped();
102  }
103  }
104  }
105 
112  public function recentChangesFlags( $flags, $nothing = '&#160;' ) {
113  global $wgRecentChangesFlags;
114  $f = '';
115  foreach ( array_keys( $wgRecentChangesFlags ) as $flag ) {
116  $f .= isset( $flags[$flag] ) && $flags[$flag]
117  ? self::flag( $flag )
118  : $nothing;
119  }
120 
121  return $f;
122  }
123 
133  public static function flag( $flag ) {
134  static $flagInfos = null;
135  if ( is_null( $flagInfos ) ) {
136  global $wgRecentChangesFlags;
137  $flagInfos = array();
138  foreach ( $wgRecentChangesFlags as $key => $value ) {
139  $flagInfos[$key]['letter'] = wfMessage( $value['letter'] )->escaped();
140  $flagInfos[$key]['title'] = wfMessage( $value['title'] )->escaped();
141  // Allow customized class name, fall back to flag name
142  $flagInfos[$key]['class'] = Sanitizer::escapeClass(
143  isset( $value['class'] ) ? $value['class'] : $key );
144  }
145  }
146 
147  // Inconsistent naming, bleh, kepted for b/c
148  $map = array(
149  'minoredit' => 'minor',
150  'botedit' => 'bot',
151  );
152  if ( isset( $map[$flag] ) ) {
153  $flag = $map[$flag];
154  }
155 
156  return "<abbr class='" . $flagInfos[$flag]['class'] . "' title='" .
157  $flagInfos[$flag]['title'] . "'>" . $flagInfos[$flag]['letter'] .
158  '</abbr>';
159  }
160 
165  public function beginRecentChangesList() {
166  $this->rc_cache = array();
167  $this->rcMoveIndex = 0;
168  $this->rcCacheIndex = 0;
169  $this->lastdate = '';
170  $this->rclistOpen = false;
171  $this->getOutput()->addModuleStyles( 'mediawiki.special.changeslist' );
172 
173  return '<div class="mw-changeslist">';
174  }
175 
179  public function initChangesListRows( $rows ) {
180  wfRunHooks( 'ChangesListInitRows', array( $this, $rows ) );
181  }
182 
190  public static function showCharacterDifference( $old, $new, IContextSource $context = null ) {
191  global $wgRCChangedSizeThreshold, $wgMiserMode;
192 
193  if ( !$context ) {
195  }
196 
197  $new = (int)$new;
198  $old = (int)$old;
199  $szdiff = $new - $old;
200 
201  $lang = $context->getLanguage();
202  $code = $lang->getCode();
203  static $fastCharDiff = array();
204  if ( !isset( $fastCharDiff[$code] ) ) {
205  $fastCharDiff[$code] = $wgMiserMode || $context->msg( 'rc-change-size' )->plain() === '$1';
206  }
207 
208  $formattedSize = $lang->formatNum( $szdiff );
209 
210  if ( !$fastCharDiff[$code] ) {
211  $formattedSize = $context->msg( 'rc-change-size', $formattedSize )->text();
212  }
213 
214  if ( abs( $szdiff ) > abs( $wgRCChangedSizeThreshold ) ) {
215  $tag = 'strong';
216  } else {
217  $tag = 'span';
218  }
219 
220  if ( $szdiff === 0 ) {
221  $formattedSizeClass = 'mw-plusminus-null';
222  } elseif ( $szdiff > 0 ) {
223  $formattedSize = '+' . $formattedSize;
224  $formattedSizeClass = 'mw-plusminus-pos';
225  } else {
226  $formattedSizeClass = 'mw-plusminus-neg';
227  }
228 
229  $formattedTotalSize = $context->msg( 'rc-change-size-new' )->numParams( $new )->text();
230 
231  return Html::element( $tag,
232  array( 'dir' => 'ltr', 'class' => $formattedSizeClass, 'title' => $formattedTotalSize ),
233  $context->msg( 'parentheses', $formattedSize )->plain() ) . $lang->getDirMark();
234  }
235 
243  public function formatCharacterDifference( RecentChange $old, RecentChange $new = null ) {
244  $oldlen = $old->mAttribs['rc_old_len'];
245 
246  if ( $new ) {
247  $newlen = $new->mAttribs['rc_new_len'];
248  } else {
249  $newlen = $old->mAttribs['rc_new_len'];
250  }
251 
252  if ( $oldlen === null || $newlen === null ) {
253  return '';
254  }
255 
256  return self::showCharacterDifference( $oldlen, $newlen, $this->getContext() );
257  }
258 
263  public function endRecentChangesList() {
264  $out = $this->rclistOpen ? "</ul>\n" : '';
265  $out .= '</div>';
266 
267  return $out;
268  }
269 
274  public function insertDateHeader( &$s, $rc_timestamp ) {
275  # Make date header if necessary
276  $date = $this->getLanguage()->userDate( $rc_timestamp, $this->getUser() );
277  if ( $date != $this->lastdate ) {
278  if ( $this->lastdate != '' ) {
279  $s .= "</ul>\n";
280  }
281  $s .= Xml::element( 'h4', null, $date ) . "\n<ul class=\"special\">";
282  $this->lastdate = $date;
283  $this->rclistOpen = true;
284  }
285  }
286 
292  public function insertLog( &$s, $title, $logtype ) {
293  $page = new LogPage( $logtype );
294  $logname = $page->getName()->escaped();
295  $s .= $this->msg( 'parentheses' )->rawParams( Linker::linkKnown( $title, $logname ) )->escaped();
296  }
297 
303  public function insertDiffHist( &$s, &$rc, $unpatrolled ) {
304  # Diff link
305  if ( $rc->mAttribs['rc_type'] == RC_NEW || $rc->mAttribs['rc_type'] == RC_LOG ) {
306  $diffLink = $this->message['diff'];
307  } elseif ( !self::userCan( $rc, Revision::DELETED_TEXT, $this->getUser() ) ) {
308  $diffLink = $this->message['diff'];
309  } else {
310  $query = array(
311  'curid' => $rc->mAttribs['rc_cur_id'],
312  'diff' => $rc->mAttribs['rc_this_oldid'],
313  'oldid' => $rc->mAttribs['rc_last_oldid']
314  );
315 
316  $diffLink = Linker::linkKnown(
317  $rc->getTitle(),
318  $this->message['diff'],
319  array( 'tabindex' => $rc->counter ),
320  $query
321  );
322  }
323  $diffhist = $diffLink . $this->message['pipe-separator'];
324  # History link
325  $diffhist .= Linker::linkKnown(
326  $rc->getTitle(),
327  $this->message['hist'],
328  array(),
329  array(
330  'curid' => $rc->mAttribs['rc_cur_id'],
331  'action' => 'history'
332  )
333  );
334  // @todo FIXME: Hard coded ". .". Is there a message for this? Should there be?
335  $s .= $this->msg( 'parentheses' )->rawParams( $diffhist )->escaped() .
336  ' <span class="mw-changeslist-separator">. .</span> ';
337  }
338 
345  public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
346  $params = array();
347 
348  $articlelink = Linker::linkKnown(
349  $rc->getTitle(),
350  null,
351  array( 'class' => 'mw-changeslist-title' ),
352  $params
353  );
354  if ( $this->isDeleted( $rc, Revision::DELETED_TEXT ) ) {
355  $articlelink = '<span class="history-deleted">' . $articlelink . '</span>';
356  }
357  # To allow for boldening pages watched by this user
358  $articlelink = "<span class=\"mw-title\">{$articlelink}</span>";
359  # RTL/LTR marker
360  $articlelink .= $this->getLanguage()->getDirMark();
361 
362  wfRunHooks( 'ChangesListInsertArticleLink',
363  array( &$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) );
364 
365  $s .= " $articlelink";
366  }
367 
375  public function getTimestamp( $rc ) {
376  // @todo FIXME: Hard coded ". .". Is there a message for this? Should there be?
377  return $this->message['semicolon-separator'] . '<span class="mw-changeslist-date">' .
378  $this->getLanguage()->userTime(
379  $rc->mAttribs['rc_timestamp'],
380  $this->getUser()
381  ) . '</span> <span class="mw-changeslist-separator">. .</span> ';
382  }
383 
390  public function insertTimestamp( &$s, $rc ) {
391  $s .= $this->getTimestamp( $rc );
392  }
393 
400  public function insertUserRelatedLinks( &$s, &$rc ) {
401  if ( $this->isDeleted( $rc, Revision::DELETED_USER ) ) {
402  $s .= ' <span class="history-deleted">' .
403  $this->msg( 'rev-deleted-user' )->escaped() . '</span>';
404  } else {
405  $s .= $this->getLanguage()->getDirMark() . Linker::userLink( $rc->mAttribs['rc_user'],
406  $rc->mAttribs['rc_user_text'] );
407  $s .= Linker::userToolLinks( $rc->mAttribs['rc_user'], $rc->mAttribs['rc_user_text'] );
408  }
409  }
410 
417  public function insertLogEntry( $rc ) {
418  $formatter = LogFormatter::newFromRow( $rc->mAttribs );
419  $formatter->setContext( $this->getContext() );
420  $formatter->setShowUserToolLinks( true );
421  $mark = $this->getLanguage()->getDirMark();
422 
423  return $formatter->getActionText() . " $mark" . $formatter->getComment();
424  }
425 
431  public function insertComment( $rc ) {
432  if ( $rc->mAttribs['rc_type'] != RC_MOVE && $rc->mAttribs['rc_type'] != RC_MOVE_OVER_REDIRECT ) {
433  if ( $this->isDeleted( $rc, Revision::DELETED_COMMENT ) ) {
434  return ' <span class="history-deleted">' .
435  $this->msg( 'rev-deleted-comment' )->escaped() . '</span>';
436  } else {
437  return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
438  }
439  }
440 
441  return '';
442  }
443 
450  public static function usePatrol() {
451  global $wgUser;
452 
453  wfDeprecated( __METHOD__, '1.22' );
454 
455  return $wgUser->useRCPatrol();
456  }
457 
463  protected function numberofWatchingusers( $count ) {
464  static $cache = array();
465  if ( $count > 0 ) {
466  if ( !isset( $cache[$count] ) ) {
467  $cache[$count] = $this->msg( 'number_of_watching_users_RCview' )
468  ->numParams( $count )->escaped();
469  }
470 
471  return $cache[$count];
472  } else {
473  return '';
474  }
475  }
476 
483  public static function isDeleted( $rc, $field ) {
484  return ( $rc->mAttribs['rc_deleted'] & $field ) == $field;
485  }
486 
495  public static function userCan( $rc, $field, User $user = null ) {
496  if ( $rc->mAttribs['rc_type'] == RC_LOG ) {
497  return LogEventsList::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
498  } else {
499  return Revision::userCanBitfield( $rc->mAttribs['rc_deleted'], $field, $user );
500  }
501  }
502 
508  protected function maybeWatchedLink( $link, $watched = false ) {
509  if ( $watched ) {
510  return '<strong class="mw-watched">' . $link . '</strong>';
511  } else {
512  return '<span class="mw-rc-unwatched">' . $link . '</span>';
513  }
514  }
515 
521  public function insertRollback( &$s, &$rc ) {
522  if ( $rc->mAttribs['rc_type'] == RC_EDIT
523  && $rc->mAttribs['rc_this_oldid']
524  && $rc->mAttribs['rc_cur_id']
525  ) {
526  $page = $rc->getTitle();
529  if ( $this->getUser()->isAllowed( 'rollback' )
530  && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid']
531  ) {
532  $rev = new Revision( array(
533  'title' => $page,
534  'id' => $rc->mAttribs['rc_this_oldid'],
535  'user' => $rc->mAttribs['rc_user'],
536  'user_text' => $rc->mAttribs['rc_user_text'],
537  'deleted' => $rc->mAttribs['rc_deleted']
538  ) );
539  $s .= ' ' . Linker::generateRollback( $rev, $this->getContext() );
540  }
541  }
542  }
543 
549  public function insertTags( &$s, &$rc, &$classes ) {
550  if ( empty( $rc->mAttribs['ts_tags'] ) ) {
551  return;
552  }
553 
554  list( $tagSummary, $newClasses ) = ChangeTags::formatSummaryRow(
555  $rc->mAttribs['ts_tags'],
556  'changeslist'
557  );
558  $classes = array_merge( $classes, $newClasses );
559  $s .= ' ' . $tagSummary;
560  }
561 
562  public function insertExtra( &$s, &$rc, &$classes ) {
563  // Empty, used for subclasses to add anything special.
564  }
565 
566  protected function showAsUnpatrolled( RecentChange $rc ) {
567  return self::isUnpatrolled( $rc, $this->getUser() );
568  }
569 
575  public static function isUnpatrolled( $rc, User $user ) {
576  if ( $rc instanceof RecentChange ) {
577  $isPatrolled = $rc->mAttribs['rc_patrolled'];
578  $rcType = $rc->mAttribs['rc_type'];
579  } else {
580  $isPatrolled = $rc->rc_patrolled;
581  $rcType = $rc->rc_type;
582  }
583 
584  if ( !$isPatrolled ) {
585  if ( $user->useRCPatrol() ) {
586  return true;
587  }
588  if ( $user->useNPPatrol() && $rcType == RC_NEW ) {
589  return true;
590  }
591  }
592 
593  return false;
594  }
595 }
Revision\DELETED_USER
const DELETED_USER
Definition: Revision.php:67
ChangesList\endRecentChangesList
endRecentChangesList()
Returns text for the end of RC.
Definition: ChangesList.php:262
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:33
$wgUser
$wgUser
Definition: Setup.php:552
Linker\generateRollback
static generateRollback( $rev, IContextSource $context=null, $options=array( 'verify'))
Generate a rollback link for a given revision.
Definition: Linker.php:1770
ContextSource\getContext
getContext()
Get the RequestContext object.
Definition: ContextSource.php:40
Linker\commentBlock
static commentBlock( $comment, $title=null, $local=false)
Wrap a comment in standard punctuation and formatting if it's non-empty, otherwise return empty strin...
Definition: Linker.php:1556
ChangesList\insertComment
insertComment( $rc)
Insert a formatted comment.
Definition: ChangesList.php:430
ChangesList\setWatchlistDivs
setWatchlistDivs( $value=true)
Sets the list to use a "<li class='watchlist-(namespace)-(page)'>" tag.
Definition: ChangesList.php:78
ChangesList\newFromContext
static newFromContext(IContextSource $context)
Fetch an appropriate changes list class for the specified context Some users might want to use an enh...
Definition: ChangesList.php:61
Revision\DELETED_COMMENT
const DELETED_COMMENT
Definition: Revision.php:66
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
ContextSource\msg
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Definition: ContextSource.php:175
IContextSource\getSkin
getSkin()
Get the Skin object.
Linker\userLink
static userLink( $userId, $userName, $altUserName=false)
Make user link (or user contributions for unregistered users)
Definition: Linker.php:1072
ChangesList\usePatrol
static usePatrol()
Check whether to enable recent changes patrol features.
Definition: ChangesList.php:449
RecentChange
Utility class for creating new RC entries.
Definition: RecentChange.php:63
$f
$f
Definition: UtfNormalTest2.php:38
RC_MOVE_OVER_REDIRECT
const RC_MOVE_OVER_REDIRECT
Definition: Defines.php:182
ChangesList\maybeWatchedLink
maybeWatchedLink( $link, $watched=false)
Definition: ChangesList.php:507
RC_LOG
const RC_LOG
Definition: Defines.php:181
RC_MOVE
const RC_MOVE
Definition: Defines.php:180
ChangesList\insertLog
insertLog(&$s, $title, $logtype)
Definition: ChangesList.php:291
$params
$params
Definition: styleTest.css.php:40
RC_EDIT
const RC_EDIT
Definition: Defines.php:178
IContextSource\msg
msg()
Get a Message object with context set.
$s
$s
Definition: mergeMessageFileList.php:156
ChangesList\$rcCacheIndex
$rcCacheIndex
Definition: ChangesList.php:34
Sanitizer\escapeClass
static escapeClass( $class)
Given a value, escape it so that it can be used as a CSS class and return it.
Definition: Sanitizer.php:1126
Revision\userCanBitfield
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this revision,...
Definition: Revision.php:1641
ChangesList\__construct
__construct( $obj)
Changeslist constructor.
Definition: ChangesList.php:43
ChangesList\formatCharacterDifference
formatCharacterDifference(RecentChange $old, RecentChange $new=null)
Format the character difference of one or several changes.
Definition: ChangesList.php:242
$flags
it s the revision text itself In either if gzip is the revision text is gzipped $flags
Definition: hooks.txt:2113
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
ChangesList\$lastdate
$lastdate
Definition: ChangesList.php:31
$link
set to $title object and return false for a match for latest after cache objects are set use the ContentHandler facility to handle CSS and JavaScript for highlighting & $link
Definition: hooks.txt:2149
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
ChangesList\isDeleted
static isDeleted( $rc, $field)
Determine if said field of a revision is hidden.
Definition: ChangesList.php:482
ChangesList\flag
static flag( $flag)
Provide the "<abbr>" element appropriate to a given abbreviated flag, namely the flag indicating a ne...
Definition: ChangesList.php:132
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:154
Revision
Definition: Revision.php:26
ChangesList\insertDateHeader
insertDateHeader(&$s, $rc_timestamp)
Definition: ChangesList.php:273
ChangesList\insertArticleLink
insertArticleLink(&$s, &$rc, $unpatrolled, $watched)
Definition: ChangesList.php:344
$out
$out
Definition: UtfNormalGenerate.php:167
wfDeprecated
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
Definition: GlobalFunctions.php:1127
LogFormatter\newFromRow
static newFromRow( $row)
Handy shortcut for constructing a formatter directly from database row.
Definition: LogFormatter.php:71
Html\element
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:148
ChangesList\insertLogEntry
insertLogEntry( $rc)
Insert a formatted action.
Definition: ChangesList.php:416
ContextSource\getOutput
getOutput()
Get the OutputPage object.
Definition: ContextSource.php:122
ContextSource
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
Definition: ContextSource.php:30
ChangesList\isWatchlist
isWatchlist()
Definition: ChangesList.php:86
ChangesList\insertTags
insertTags(&$s, &$rc, &$classes)
Definition: ChangesList.php:548
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
ContextSource\getSkin
getSkin()
Get the Skin object.
Definition: ContextSource.php:164
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:39
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4001
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
ChangesList\insertUserRelatedLinks
insertUserRelatedLinks(&$s, &$rc)
Insert links to user page, user talk page and eventually a blocking link.
Definition: ChangesList.php:399
ContextSource\setContext
setContext(IContextSource $context)
Set the IContextSource object.
Definition: ContextSource.php:57
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
ChangesList\$rclistOpen
$rclistOpen
Definition: ChangesList.php:35
EnhancedChangesList
Definition: EnhancedChangesList.php:23
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
OldChangesList
Definition: OldChangesList.php:23
skin
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 skin(according to that user 's preference)
$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
ChangesList\insertTimestamp
insertTimestamp(&$s, $rc)
Insert time timestamp string from $rc into $s.
Definition: ChangesList.php:389
ChangesList\numberofWatchingusers
numberofWatchingusers( $count)
Returns the string which indicates the number of watching users.
Definition: ChangesList.php:462
ChangesList\showAsUnpatrolled
showAsUnpatrolled(RecentChange $rc)
Definition: ChangesList.php:565
ChangesList\showCharacterDifference
static showCharacterDifference( $old, $new, IContextSource $context=null)
Show formatted char difference.
Definition: ChangesList.php:189
IContextSource\getUser
getUser()
Get the User object.
RC_NEW
const RC_NEW
Definition: Defines.php:179
ChangesList\preCacheMessages
preCacheMessages()
As we use the same small set of messages in various methods and that they are called often,...
Definition: ChangesList.php:94
RequestContext\getMain
static getMain()
Static methods.
Definition: RequestContext.php:420
$user
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
Definition: hooks.txt:237
ChangesList\$watchlist
$watchlist
Definition: ChangesList.php:30
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
$count
$count
Definition: UtfNormalTest2.php:96
$rev
presenting them properly to the user as errors is done by the caller return true use this to change the list i e etc $rev
Definition: hooks.txt:1337
ChangesList\beginRecentChangesList
beginRecentChangesList()
Returns text for the start of the tabular part of RC.
Definition: ChangesList.php:164
$cache
$cache
Definition: mcc.php:32
LogEventsList\userCanBitfield
static userCanBitfield( $bitfield, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this log row,...
Definition: LogEventsList.php:456
ChangesList\initChangesListRows
initChangesListRows( $rows)
Definition: ChangesList.php:178
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
ChangesList\recentChangesFlags
recentChangesFlags( $flags, $nothing='&#160;')
Returns the appropriate flags for new page, minor change and patrolling.
Definition: ChangesList.php:111
ChangesList\getTimestamp
getTimestamp( $rc)
Get the timestamp from $rc formatted with current user's settings and a separator.
Definition: ChangesList.php:374
IContextSource\getRequest
getRequest()
Get the WebRequest object.
ChangesList
Definition: ChangesList.php:25
ChangesList\$skin
Skin $skin
Definition: ChangesList.php:28
ChangesList\isUnpatrolled
static isUnpatrolled( $rc, User $user)
Definition: ChangesList.php:574
ChangesList\$rc_cache
$rc_cache
Definition: ChangesList.php:33
ChangesList\$rcMoveIndex
$rcMoveIndex
Definition: ChangesList.php:36
Skin
The main skin class which provides methods and properties for all other skins.
Definition: Skin.php:35
$query
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query
Definition: hooks.txt:1105
User
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:59
message
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 message
Definition: hooks.txt:1624
ChangesList\$message
$message
Definition: ChangesList.php:32
Revision\DELETED_TEXT
const DELETED_TEXT
Definition: Revision.php:65
ChangesList\userCan
static userCan( $rc, $field, User $user=null)
Determine if the current user is allowed to view a particular field of this revision,...
Definition: ChangesList.php:494
ChangesList\insertExtra
insertExtra(&$s, &$rc, &$classes)
Definition: ChangesList.php:561
ChangesList\insertRollback
insertRollback(&$s, &$rc)
Inserts a rollback link.
Definition: ChangesList.php:520
IContextSource\getLanguage
getLanguage()
Get the Language object.
ChangeTags\formatSummaryRow
static formatSummaryRow( $tags, $page)
Creates HTML for the given tags.
Definition: ChangeTags.php:34
ChangesList\insertDiffHist
insertDiffHist(&$s, &$rc, $unpatrolled)
Definition: ChangesList.php:302