/**
* @param IContextSource|Skin $obj
+ * @throws MWException
*/
public function __construct( $obj ) {
if ( $obj instanceof Skin ) {
* @return string
*/
public function recentChangesLine( &$baseRC, $watched = false ) {
- wfProfileIn( __METHOD__ );
$date = $this->getLanguage()->userDate(
$baseRC->mAttribs['rc_timestamp'],
$cacheEntry = $this->cacheEntryFactory->newFromRecentChange( $baseRC, $watched );
$this->addCacheEntry( $cacheEntry );
- wfProfileOut( __METHOD__ );
-
return $ret;
}
* @return string
*/
protected function recentChangesBlockGroup( $block ) {
- global $wgRCShowChangedSize;
-
- wfProfileIn( __METHOD__ );
# Add the namespace and title of the block as part of the class
$classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
$namehidden = true;
$allLogs = true;
$oldid = '';
+ $RCShowChangedSize = $this->getConfig()->get( 'RCShowChangedSize' );
foreach ( $block as $rcObj ) {
$oldid = $rcObj->mAttribs['rc_last_oldid'];
if ( $rcObj->mAttribs['rc_type'] == RC_NEW ) {
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
# Character difference (does not apply if only log items)
- if ( $wgRCShowChangedSize && !$allLogs ) {
+ if ( $RCShowChangedSize && !$allLogs ) {
$last = 0;
$first = count( $block ) - 1;
# Some events (like logs) have an "empty" size, so we need to skip those...
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
# Character diff
- if ( $wgRCShowChangedSize ) {
+ if ( $RCShowChangedSize ) {
$cd = $this->formatCharacterDifference( $rcObj );
if ( $cd !== '' ) {
$r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
$this->rcCacheIndex++;
- wfProfileOut( __METHOD__ );
-
return $r;
}
* @return string A HTML formatted line (generated using $r)
*/
protected function recentChangesBlockLine( $rcObj ) {
- global $wgRCShowChangedSize;
-
- wfProfileIn( __METHOD__ );
$query['curid'] = $rcObj->mAttribs['rc_cur_id'];
$type = $rcObj->mAttribs['rc_type'];
}
$r .= ' <span class="mw-changeslist-separator">. .</span> ';
# Character diff
- if ( $wgRCShowChangedSize ) {
+ if ( $this->getConfig()->get( 'RCShowChangedSize' ) ) {
$cd = $this->formatCharacterDifference( $rcObj );
if ( $cd !== '' ) {
$r .= $cd . ' <span class="mw-changeslist-separator">. .</span> ';
$r .= "</td></tr></table>\n";
- wfProfileOut( __METHOD__ );
-
return $r;
}
return '';
}
- wfProfileIn( __METHOD__ );
-
$blockOut = '';
foreach ( $this->rc_cache as $block ) {
if ( count( $block ) < 2 ) {
}
}
- wfProfileOut( __METHOD__ );
-
return '<div>' . $blockOut . '</div>';
}