MediaWiki  1.23.8
EnhancedChangesList.php
Go to the documentation of this file.
1 <?php
24 
28  protected $cacheEntryFactory;
29 
33  protected $rc_cache;
34 
38  public function __construct( $obj ) {
39  if ( $obj instanceof Skin ) {
40  // @todo: deprecate constructing with Skin
41  $context = $obj->getContext();
42  } else {
43  if ( ! $obj instanceof IContextSource ) {
44  throw new MWException( 'EnhancedChangesList must be constructed with a '
45  . 'context source or skin.' );
46  }
47 
48  $context = $obj;
49  }
50 
51  parent::__construct( $context );
52 
53  // message is set by the parent ChangesList class
54  $this->cacheEntryFactory = new RCCacheEntryFactory(
55  $context,
56  $this->message
57  );
58  }
59 
64  public function beginRecentChangesList() {
65  $this->rc_cache = array();
66  $this->rcMoveIndex = 0;
67  $this->rcCacheIndex = 0;
68  $this->lastdate = '';
69  $this->rclistOpen = false;
70  $this->getOutput()->addModuleStyles( array(
71  'mediawiki.special.changeslist',
72  'mediawiki.special.changeslist.enhanced',
73  ) );
74  $this->getOutput()->addModules( array(
75  'jquery.makeCollapsible',
76  'mediawiki.icon',
77  ) );
78 
79  return '<div class="mw-changeslist">';
80  }
81 
90  public function recentChangesLine( &$baseRC, $watched = false ) {
91  wfProfileIn( __METHOD__ );
92 
93  # If it's a new day, add the headline and flush the cache
94  $date = $this->getLanguage()->userDate(
95  $baseRC->mAttribs['rc_timestamp'],
96  $this->getUser()
97  );
98 
99  $ret = '';
100 
101  if ( $date != $this->lastdate ) {
102  # Process current cache
103  $ret = $this->recentChangesBlock();
104  $this->rc_cache = array();
105  $ret .= Xml::element( 'h4', null, $date ) . "\n";
106  $this->lastdate = $date;
107  }
108 
109  $cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched );
110  $this->addCacheEntry( $cacheEntry );
111 
112  wfProfileOut( __METHOD__ );
113 
114  return $ret;
115  }
116 
123  protected function addCacheEntry( RCCacheEntry $cacheEntry ) {
124  $title = $cacheEntry->getTitle();
125  $secureName = $title->getPrefixedDBkey();
126 
127  $type = $cacheEntry->mAttribs['rc_type'];
128 
129  if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
130  # Use an @ character to prevent collision with page names
131  $this->rc_cache['@@' . ( $this->rcMoveIndex++ )] = array( $cacheEntry );
132  } else {
133  # Logs are grouped by type
134  if ( $type == RC_LOG ) {
135  $secureName = SpecialPage::getTitleFor(
136  'Log',
137  $cacheEntry->mAttribs['rc_log_type']
138  )->getPrefixedDBkey();
139  }
140  if ( !isset( $this->rc_cache[$secureName] ) ) {
141  $this->rc_cache[$secureName] = array();
142  }
143 
144  array_push( $this->rc_cache[$secureName], $cacheEntry );
145  }
146  }
147 
153  protected function recentChangesBlockGroup( $block ) {
154  global $wgRCShowChangedSize;
155 
156  wfProfileIn( __METHOD__ );
157 
158  # Add the namespace and title of the block as part of the class
159  $classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
160  if ( $block[0]->mAttribs['rc_log_type'] ) {
161  # Log entry
162  $classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-'
163  . $block[0]->mAttribs['rc_log_type'] );
164  } else {
165  $classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns'
166  . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
167  }
168  $classes[] = $block[0]->watched && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
169  ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
170  $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
171  Html::openElement( 'tr' );
172 
173  # Collate list of users
174  $userlinks = array();
175  # Other properties
176  $unpatrolled = false;
177  $isnew = false;
178  $allBots = true;
179  $allMinors = true;
180  $curId = $currentRevision = 0;
181  # Some catalyst variables...
182  $namehidden = true;
183  $allLogs = true;
184  $oldid = '';
185  foreach ( $block as $rcObj ) {
186  $oldid = $rcObj->mAttribs['rc_last_oldid'];
187  if ( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
188  $isnew = true;
189  }
190  // If all log actions to this page were hidden, then don't
191  // give the name of the affected page for this block!
192  if ( !$this->isDeleted( $rcObj, LogPage::DELETED_ACTION ) ) {
193  $namehidden = false;
194  }
195  $u = $rcObj->userlink;
196  if ( !isset( $userlinks[$u] ) ) {
197  $userlinks[$u] = 0;
198  }
199  if ( $rcObj->unpatrolled ) {
200  $unpatrolled = true;
201  }
202  if ( $rcObj->mAttribs['rc_type'] != RC_LOG ) {
203  $allLogs = false;
204  }
205  # Get the latest entry with a page_id and oldid
206  # since logs may not have these.
207  if ( !$curId && $rcObj->mAttribs['rc_cur_id'] ) {
208  $curId = $rcObj->mAttribs['rc_cur_id'];
209  }
210  if ( !$currentRevision && $rcObj->mAttribs['rc_this_oldid'] ) {
211  $currentRevision = $rcObj->mAttribs['rc_this_oldid'];
212  }
213 
214  if ( !$rcObj->mAttribs['rc_bot'] ) {
215  $allBots = false;
216  }
217  if ( !$rcObj->mAttribs['rc_minor'] ) {
218  $allMinors = false;
219  }
220 
221  $userlinks[$u]++;
222  }
223 
224  # Sort the list and convert to text
225  krsort( $userlinks );
226  asort( $userlinks );
227  $users = array();
228  foreach ( $userlinks as $userlink => $count ) {
229  $text = $userlink;
230  $text .= $this->getLanguage()->getDirMark();
231  if ( $count > 1 ) {
232  // @todo FIXME: Hardcoded '×'. Should be a message.
233  $formattedCount = $this->getLanguage()->formatNum( $count ) . '×';
234  $text .= ' ' . $this->msg( 'parentheses' )->rawParams( $formattedCount )->escaped();
235  }
236  array_push( $users, $text );
237  }
238 
239  $users = ' <span class="changedby">'
240  . $this->msg( 'brackets' )->rawParams(
241  implode( $this->message['semicolon-separator'], $users )
242  )->escaped() . '</span>';
243 
244  $tl = '<span class="mw-collapsible-toggle mw-collapsible-arrow ' .
245  'mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span>';
246  $r .= "<td>$tl</td>";
247 
248  # Main line
249  $r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags( array(
250  'newpage' => $isnew, # show, when one have this flag
251  'minor' => $allMinors, # show only, when all have this flag
252  'unpatrolled' => $unpatrolled, # show, when one have this flag
253  'bot' => $allBots, # show only, when all have this flag
254  ) );
255 
256  # Timestamp
257  $r .= '&#160;' . $block[0]->timestamp . '&#160;</td><td>';
258 
259  # Article link
260  if ( $namehidden ) {
261  $r .= ' <span class="history-deleted">' .
262  $this->msg( 'rev-deleted-event' )->escaped() . '</span>';
263  } elseif ( $allLogs ) {
264  $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
265  } else {
266  $this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
267  }
268 
269  $r .= $this->getLanguage()->getDirMark();
270 
271  $queryParams['curid'] = $curId;
272 
273  # Changes message
274  static $nchanges = array();
275  static $sinceLastVisitMsg = array();
276 
277  $n = count( $block );
278  if ( !isset( $nchanges[$n] ) ) {
279  $nchanges[$n] = $this->msg( 'nchanges' )->numParams( $n )->escaped();
280  }
281 
282  $sinceLast = 0;
283  $unvisitedOldid = null;
285  foreach ( $block as $rcObj ) {
286  // Same logic as below inside main foreach
287  if ( $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched ) {
288  $sinceLast++;
289  $unvisitedOldid = $rcObj->mAttribs['rc_last_oldid'];
290  }
291  }
292  if ( !isset( $sinceLastVisitMsg[$sinceLast] ) ) {
293  $sinceLastVisitMsg[$sinceLast] =
294  $this->msg( 'enhancedrc-since-last-visit' )->numParams( $sinceLast )->escaped();
295  }
296 
297  # Total change link
298  $r .= ' ';
299  $logtext = '';
301  $block0 = $block[0];
302  if ( !$allLogs ) {
303  if ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
304  $logtext .= $nchanges[$n];
305  } elseif ( $isnew ) {
306  $logtext .= $nchanges[$n];
307  } else {
308  $logtext .= Linker::link(
309  $block0->getTitle(),
310  $nchanges[$n],
311  array(),
312  $queryParams + array(
313  'diff' => $currentRevision,
314  'oldid' => $oldid,
315  ),
316  array( 'known', 'noclasses' )
317  );
318  if ( $sinceLast > 0 && $sinceLast < $n ) {
319  $logtext .= $this->message['pipe-separator'] . Linker::link(
320  $block0->getTitle(),
321  $sinceLastVisitMsg[$sinceLast],
322  array(),
323  $queryParams + array(
324  'diff' => $currentRevision,
325  'oldid' => $unvisitedOldid,
326  ),
327  array( 'known', 'noclasses' )
328  );
329  }
330  }
331  }
332 
333  # History
334  if ( $allLogs ) {
335  // don't show history link for logs
336  } elseif ( $namehidden || !$block0->getTitle()->exists() ) {
337  $logtext .= $this->message['pipe-separator'] . $this->message['enhancedrc-history'];
338  } else {
339  $params = $queryParams;
340  $params['action'] = 'history';
341 
342  $logtext .= $this->message['pipe-separator'] .
344  $block0->getTitle(),
345  $this->message['enhancedrc-history'],
346  array(),
347  $params
348  );
349  }
350 
351  if ( $logtext !== '' ) {
352  $r .= $this->msg( 'parentheses' )->rawParams( $logtext )->escaped();
353  }
354 
355  $r .= ' <span class="mw-changeslist-separator">. .</span> ';
356 
357  # Character difference (does not apply if only log items)
358  if ( $wgRCShowChangedSize && !$allLogs ) {
359  $last = 0;
360  $first = count( $block ) - 1;
361  # Some events (like logs) have an "empty" size, so we need to skip those...
362  while ( $last < $first && $block[$last]->mAttribs['rc_new_len'] === null ) {
363  $last++;
364  }
365  while ( $first > $last && $block[$first]->mAttribs['rc_old_len'] === null ) {
366  $first--;
367  }
368  # Get net change
369  $chardiff = $this->formatCharacterDifference( $block[$first], $block[$last] );
370 
371  if ( $chardiff == '' ) {
372  $r .= ' ';
373  } else {
374  $r .= ' ' . $chardiff . ' <span class="mw-changeslist-separator">. .</span> ';
375  }
376  }
377 
378  $r .= $users;
379  $r .= $this->numberofWatchingusers( $block0->numberofWatchingusers );
380  $r .= '</td></tr>';
381 
382  # Sub-entries
383  foreach ( $block as $rcObj ) {
384  # Classes to apply -- TODO implement
385  $classes = array();
386  $type = $rcObj->mAttribs['rc_type'];
387 
388  $trClass = $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
389  ? ' class="mw-enhanced-watched"' : '';
390 
391  $r .= '<tr' . $trClass . '><td></td><td class="mw-enhanced-rc">';
392  $r .= $this->recentChangesFlags( array(
393  'newpage' => $type == RC_NEW,
394  'minor' => $rcObj->mAttribs['rc_minor'],
395  'unpatrolled' => $rcObj->unpatrolled,
396  'bot' => $rcObj->mAttribs['rc_bot'],
397  ) );
398  $r .= '&#160;</td><td class="mw-enhanced-rc-nested"><span class="mw-enhanced-rc-time">';
399 
400  $params = $queryParams;
401 
402  if ( $rcObj->mAttribs['rc_this_oldid'] != 0 ) {
403  $params['oldid'] = $rcObj->mAttribs['rc_this_oldid'];
404  }
405 
406  # Log timestamp
407  if ( $type == RC_LOG ) {
408  $link = $rcObj->timestamp;
409  # Revision link
410  } elseif ( !ChangesList::userCan( $rcObj, Revision::DELETED_TEXT, $this->getUser() ) ) {
411  $link = '<span class="history-deleted">' . $rcObj->timestamp . '</span> ';
412  } else {
413 
415  $rcObj->getTitle(),
416  $rcObj->timestamp,
417  array(),
418  $params
419  );
420  if ( $this->isDeleted( $rcObj, Revision::DELETED_TEXT ) ) {
421  $link = '<span class="history-deleted">' . $link . '</span> ';
422  }
423  }
424  $r .= $link . '</span>';
425 
426  if ( !$type == RC_LOG || $type == RC_NEW ) {
427  $r .= ' ' . $this->msg( 'parentheses' )->rawParams(
428  $rcObj->curlink .
429  $this->message['pipe-separator'] .
430  $rcObj->lastlink
431  )->escaped();
432  }
433  $r .= ' <span class="mw-changeslist-separator">. .</span> ';
434 
435  # Character diff
436  if ( $wgRCShowChangedSize ) {
437  $cd = $this->formatCharacterDifference( $rcObj );
438  if ( $cd !== '' ) {
439  $r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
440  }
441  }
442 
443  if ( $rcObj->mAttribs['rc_type'] == RC_LOG ) {
444  $r .= $this->insertLogEntry( $rcObj );
445  } else {
446  # User links
447  $r .= $rcObj->userlink;
448  $r .= $rcObj->usertalklink;
449  $r .= $this->insertComment( $rcObj );
450  }
451 
452  # Rollback
453  $this->insertRollback( $r, $rcObj );
454  # Tags
455  $this->insertTags( $r, $rcObj, $classes );
456 
457  $r .= "</td></tr>\n";
458  }
459  $r .= "</table>\n";
460 
461  $this->rcCacheIndex++;
462 
463  wfProfileOut( __METHOD__ );
464 
465  return $r;
466  }
467 
475  protected function arrow( $dir, $alt = '', $title = '' ) {
476  global $wgStylePath;
477  $encUrl = htmlspecialchars( $wgStylePath . '/common/images/Arr_' . $dir . '.png' );
478  $encAlt = htmlspecialchars( $alt );
479  $encTitle = htmlspecialchars( $title );
480 
481  return "<img src=\"$encUrl\" width=\"12\" height=\"12\" alt=\"$encAlt\" title=\"$encTitle\" />";
482  }
483 
489  protected function sideArrow() {
490  $dir = $this->getLanguage()->isRTL() ? 'l' : 'r';
491 
492  return $this->arrow( $dir, '+', $this->msg( 'rc-enhanced-expand' )->text() );
493  }
494 
500  protected function downArrow() {
501  return $this->arrow( 'd', '-', $this->msg( 'rc-enhanced-hide' )->text() );
502  }
503 
508  protected function spacerArrow() {
509  return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // non-breaking space
510  }
511 
518  protected function recentChangesBlockLine( $rcObj ) {
519  global $wgRCShowChangedSize;
520 
521  wfProfileIn( __METHOD__ );
522  $query['curid'] = $rcObj->mAttribs['rc_cur_id'];
523 
524  $type = $rcObj->mAttribs['rc_type'];
525  $logType = $rcObj->mAttribs['rc_log_type'];
526  $classes = array( 'mw-enhanced-rc' );
527  if ( $logType ) {
528  # Log entry
529  $classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-' . $logType );
530  } else {
531  $classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns' .
532  $rcObj->mAttribs['rc_namespace'] . '-' . $rcObj->mAttribs['rc_title'] );
533  }
534  $classes[] = $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
535  ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
536  $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
537  Html::openElement( 'tr' );
538 
539  $r .= '<td class="mw-enhanced-rc"><span class="mw-enhancedchanges-arrow-space"></span>';
540  # Flag and Timestamp
541  if ( $type == RC_MOVE || $type == RC_MOVE_OVER_REDIRECT ) {
542  $r .= $this->recentChangesFlags( array() ); // no flags, but need the placeholders
543  } else {
544  $r .= $this->recentChangesFlags( array(
545  'newpage' => $type == RC_NEW,
546  'minor' => $rcObj->mAttribs['rc_minor'],
547  'unpatrolled' => $rcObj->unpatrolled,
548  'bot' => $rcObj->mAttribs['rc_bot'],
549  ) );
550  }
551  $r .= '&#160;' . $rcObj->timestamp . '&#160;</td><td>';
552  # Article or log link
553  if ( $logType ) {
554  $logPage = new LogPage( $logType );
555  $logTitle = SpecialPage::getTitleFor( 'Log', $logType );
556  $logName = $logPage->getName()->escaped();
557  $r .= $this->msg( 'parentheses' )
558  ->rawParams( Linker::linkKnown( $logTitle, $logName ) )->escaped();
559  } else {
560  $this->insertArticleLink( $r, $rcObj, $rcObj->unpatrolled, $rcObj->watched );
561  }
562  # Diff and hist links
563  if ( $type != RC_LOG ) {
564  $query['action'] = 'history';
565  $r .= ' ' . $this->msg( 'parentheses' )
566  ->rawParams( $rcObj->difflink . $this->message['pipe-separator'] . Linker::linkKnown(
567  $rcObj->getTitle(),
568  $this->message['hist'],
569  array(),
570  $query
571  ) )->escaped();
572  }
573  $r .= ' <span class="mw-changeslist-separator">. .</span> ';
574  # Character diff
575  if ( $wgRCShowChangedSize ) {
576  $cd = $this->formatCharacterDifference( $rcObj );
577  if ( $cd !== '' ) {
578  $r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
579  }
580  }
581 
582  if ( $type == RC_LOG ) {
583  $r .= $this->insertLogEntry( $rcObj );
584  } else {
585  $r .= ' ' . $rcObj->userlink . $rcObj->usertalklink;
586  $r .= $this->insertComment( $rcObj );
587  $this->insertRollback( $r, $rcObj );
588  }
589 
590  # Tags
591  $this->insertTags( $r, $rcObj, $classes );
592  # Show how many people are watching this if enabled
593  $r .= $this->numberofWatchingusers( $rcObj->numberofWatchingusers );
594 
595  $r .= "</td></tr></table>\n";
596 
597  wfProfileOut( __METHOD__ );
598 
599  return $r;
600  }
601 
608  protected function recentChangesBlock() {
609  if ( count( $this->rc_cache ) == 0 ) {
610  return '';
611  }
612 
613  wfProfileIn( __METHOD__ );
614 
615  $blockOut = '';
616  foreach ( $this->rc_cache as $block ) {
617  if ( count( $block ) < 2 ) {
618  $blockOut .= $this->recentChangesBlockLine( array_shift( $block ) );
619  } else {
620  $blockOut .= $this->recentChangesBlockGroup( $block );
621  }
622  }
623 
624  wfProfileOut( __METHOD__ );
625 
626  return '<div>' . $blockOut . '</div>';
627  }
628 
634  public function endRecentChangesList() {
635  return $this->recentChangesBlock() . '</div>';
636  }
637 }
ContextSource\$context
IContextSource $context
Definition: ContextSource.php:33
ChangesList\insertComment
insertComment( $rc)
Insert a formatted comment.
Definition: ChangesList.php:430
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
$last
$last
Definition: profileinfo.php:365
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
RC_MOVE_OVER_REDIRECT
const RC_MOVE_OVER_REDIRECT
Definition: Defines.php:182
ChangesList\maybeWatchedLink
maybeWatchedLink( $link, $watched=false)
Definition: ChangesList.php:507
wfProfileIn
wfProfileIn( $functionname)
Begin profiling of a function.
Definition: Profiler.php:33
RC_LOG
const RC_LOG
Definition: Defines.php:181
$n
$n
Definition: RandomTest.php:76
$ret
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 & $ret
Definition: hooks.txt:1530
RC_MOVE
const RC_MOVE
Definition: Defines.php:180
$params
$params
Definition: styleTest.css.php:40
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
RCCacheEntryFactory
Definition: RCCacheEntryFactory.php:23
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:1143
EnhancedChangesList\sideArrow
sideArrow()
Generate HTML for a right- or left-facing arrow, depending on language direction.
Definition: EnhancedChangesList.php:487
ChangesList\formatCharacterDifference
formatCharacterDifference(RecentChange $old, RecentChange $new=null)
Format the character difference of one or several changes.
Definition: ChangesList.php:242
ContextSource\getUser
getUser()
Get the User object.
Definition: ContextSource.php:132
$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
EnhancedChangesList\$cacheEntryFactory
RCCacheEntryFactory $cacheEntryFactory
Definition: EnhancedChangesList.php:27
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
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
ContextSource\getLanguage
getLanguage()
Get the Language object.
Definition: ContextSource.php:154
ChangesList\insertArticleLink
insertArticleLink(&$s, &$rc, $unpatrolled, $watched)
Definition: ChangesList.php:344
EnhancedChangesList\endRecentChangesList
endRecentChangesList()
Returns text for the end of RC If enhanced RC is in use, returns pretty much all the text.
Definition: EnhancedChangesList.php:632
Html\openElement
static openElement( $element, $attribs=array())
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
Definition: Html.php:166
codepointToUtf8
codepointToUtf8( $codepoint)
Return UTF-8 sequence for a given Unicode code point.
Definition: UtfNormalUtil.php:36
MWException
MediaWiki exception.
Definition: MWException.php:26
ChangesList\insertLogEntry
insertLogEntry( $rc)
Insert a formatted action.
Definition: ChangesList.php:416
ContextSource\getOutput
getOutput()
Get the OutputPage object.
Definition: ContextSource.php:122
wfProfileOut
wfProfileOut( $functionname='missing')
Stop profiling of a function.
Definition: Profiler.php:46
ChangesList\insertTags
insertTags(&$s, &$rc, &$classes)
Definition: ChangesList.php:548
LogPage
Class to simplify the use of log pages.
Definition: LogPage.php:32
EnhancedChangesList\beginRecentChangesList
beginRecentChangesList()
Add the JavaScript file for enhanced changeslist.
Definition: EnhancedChangesList.php:62
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
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
EnhancedChangesList\recentChangesBlockGroup
recentChangesBlockGroup( $block)
Enhanced RC group.
Definition: EnhancedChangesList.php:151
LogPage\DELETED_ACTION
const DELETED_ACTION
Definition: LogPage.php:33
EnhancedChangesList
Definition: EnhancedChangesList.php:23
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
EnhancedChangesList\arrow
arrow( $dir, $alt='', $title='')
Generate HTML for an arrow or placeholder graphic.
Definition: EnhancedChangesList.php:473
EnhancedChangesList\$rc_cache
array $rc_cache
Array of array of RCCacheEntry.
Definition: EnhancedChangesList.php:31
ChangesList\numberofWatchingusers
numberofWatchingusers( $count)
Returns the string which indicates the number of watching users.
Definition: ChangesList.php:462
EnhancedChangesList\recentChangesBlock
recentChangesBlock()
If enhanced RC is in use, this function takes the previously cached RC lines, arranges them,...
Definition: EnhancedChangesList.php:606
EnhancedChangesList\recentChangesLine
recentChangesLine(&$baseRC, $watched=false)
Format a line for enhanced recentchange (aka with javascript and block of lines).
Definition: EnhancedChangesList.php:88
RC_NEW
const RC_NEW
Definition: Defines.php:179
EnhancedChangesList\spacerArrow
spacerArrow()
Generate HTML for a spacer image.
Definition: EnhancedChangesList.php:506
only
published in in Madrid In the first edition of the Vocabolario for was published In in Rotterdam was the Dictionnaire Universel ! html< p > The first monolingual dictionary written in a Romance language was< i > Sebastián Covarrubias</i >< i > Tesoro de la lengua castellana o published in in Madrid In the first edition of the< i > Vocabolario dell< a href="/index.php?title=Accademia_della_Crusca&amp;action=edit&amp;redlink=1" class="new" title="Accademia della Crusca (page does not exist)"> Accademia della Crusca</a ></i > for was published In in Rotterdam was the< i > Dictionnaire Universel</i ></p > ! end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html php< p >< i > foo</i ></p > ! html parsoid< p >< i > foo</i >< b ></b ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html php< p >< b > foo</b ></p > ! html parsoid< p >< b > foo</b >< i ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i > foo</i ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html< p >< b > foo</b ></p > !end ! test Italics and ! wikitext foo ! html php< p >< b > foo</b ></p > ! html parsoid< p >< b > foo</b >< i ></i ></p > !end ! test Italics and ! options ! wikitext foo ! html< p >< b >< i > foo</i ></b ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo ! html< p >< i >< b > foo</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html< p >< i > foo< b > bar</b ></i ></p > !end ! test Italics and ! wikitext foo bar ! html php< p >< b > foo</b > bar</p > ! html parsoid< p >< b > foo</b > bar< i ></i ></p > !end ! test Italics and ! wikitext foo bar ! html php< p >< b > foo</b > bar</p > ! html parsoid< p >< b > foo</b > bar< b ></b ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< i > this is about< b > foo s family</b ></i ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< i > this is about< b > foo s</b > family</i ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< b > this is about< i > foo</i ></b >< i > s family</i ></p > !end ! test Italics and ! options ! wikitext this is about foo s family ! html< p >< i > this is about</i > foo< b > s family</b ></p > !end ! test Italics and ! wikitext this is about foo s family ! html< p >< b > this is about< i > foo s</i > family</b ></p > !end ! test Italicized possessive ! wikitext The s talk page ! html< p > The< i >< a href="/wiki/Main_Page" title="Main Page"> Main Page</a ></i > s talk page</p > ! end ! test Parsoid only
Definition: parserTests.txt:396
IContextSource
Interface for objects which can provide a context on request.
Definition: IContextSource.php:29
$count
$count
Definition: UtfNormalTest2.php:96
$dir
if(count( $args)==0) $dir
Definition: importImages.php:49
RCCacheEntry
Definition: RCCacheEntry.php:21
EnhancedChangesList\recentChangesBlockLine
recentChangesBlockLine( $rcObj)
Enhanced RC ungrouped line.
Definition: EnhancedChangesList.php:516
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
EnhancedChangesList\__construct
__construct( $obj)
Definition: EnhancedChangesList.php:36
ChangesList
Definition: ChangesList.php:25
Skin
The main skin class which provides methods and properties for all other skins.
Definition: Skin.php:35
RecentChange\getTitle
& getTitle()
Definition: RecentChange.php:200
$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
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
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\insertRollback
insertRollback(&$s, &$rc)
Inserts a rollback link.
Definition: ChangesList.php:520
EnhancedChangesList\downArrow
downArrow()
Generate HTML for a down-facing arrow depending on language direction.
Definition: EnhancedChangesList.php:498
EnhancedChangesList\addCacheEntry
addCacheEntry(RCCacheEntry $cacheEntry)
Put accumulated information into the cache, for later display.
Definition: EnhancedChangesList.php:121
$type
$type
Definition: testCompression.php:46