*/
protected $rc_cache;
+ /**
+ * @var TemplateParser
+ */
+ protected $templateParser;
+
/**
* @param IContextSource|Skin $obj
+ * @param array $filterGroups Array of ChangesListFilterGroup objects (currently optional)
* @throws MWException
*/
- public function __construct( $obj ) {
+ public function __construct( $obj, array $filterGroups = [] ) {
if ( $obj instanceof Skin ) {
// @todo: deprecate constructing with Skin
$context = $obj->getContext();
$context = $obj;
}
- parent::__construct( $context );
+ parent::__construct( $context, $filterGroups );
// message is set by the parent ChangesList class
$this->cacheEntryFactory = new RCCacheEntryFactory(
$this->message,
$this->linkRenderer
);
+ $this->templateParser = new TemplateParser();
}
/**
$this->rcCacheIndex++;
- $templateParser = new TemplateParser();
- return $templateParser->processTemplate(
+ return $this->templateParser->processTemplate(
'EnhancedChangesListGroup',
$templateParams
);
if ( $rc->getAttribute( 'rc_type' ) == RC_CATEGORIZE ) {
// For categorizations we must swap the category title with the page title!
$pageTitle = Title::newFromID( $rc->getAttribute( 'rc_cur_id' ) );
+ if ( !$pageTitle ) {
+ // The page has been deleted, but the RC entry
+ // deletion job has not run yet. Just skip.
+ return '';
+ }
}
$retVal = ' ' . $this->msg( 'parentheses' )