41 private $linkBatchFactory;
44 private $languageConverter;
56 parent::__construct(
'Unwatchedpages',
'unwatchedpages' );
57 $this->linkBatchFactory = $linkBatchFactory;
77 if ( !
$res->numRows() ) {
81 $batch = $this->linkBatchFactory->newLinkBatch();
82 foreach (
$res as $row ) {
83 $batch->add( $row->namespace, $row->title );
93 'tables' => [
'page',
'watchlist' ],
95 'namespace' =>
'page_namespace',
96 'title' =>
'page_title',
97 'value' =>
'page_namespace'
101 'page_is_redirect' => 0,
104 'join_conds' => [
'watchlist' => [
105 'LEFT JOIN', [
'wl_title = page_title',
106 'wl_namespace = page_namespace' ] ] ]
115 return [
'page_namespace',
'page_title' ];
123 parent::execute( $par );
124 $this->
getOutput()->addModules(
'mediawiki.special.unwatchedPages' );
134 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
136 return Html::element(
'span', [
'class' =>
'mw-invalidtitle' ],
140 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
144 $plink = $linkRenderer->makeKnownLink( $nt,
new HtmlArmor( $text ) );
145 $wlink = $linkRenderer->makeKnownLink(
147 $this->
msg(
'watch' )->text(),
148 [
'class' =>
'mw-watch-link' ],
149 [
'action' =>
'watch' ]
152 return $this->
getLanguage()->specialList( $plink, $wlink );
156 return 'maintenance';
Marks HTML that shouldn't be escaped.
static getInvalidTitleDescription(IContextSource $context, $namespace, $title)
Get a message saying that an invalid title was encountered.
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDBLoadBalancer(ILoadBalancer $loadBalancer)
getOutput()
Get the OutputPage being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
getContentLanguage()
Shortcut to get content language.
A special page that displays a list of pages that are not on anyone's watchlist.
getOrderFields()
Subclasses return an array of fields to order by here.
__construct(LinkBatchFactory $linkBatchFactory, ILoadBalancer $loadBalancer, LanguageConverterFactory $languageConverterFactory)
preprocessResults( $db, $res)
Pre-cache page existence to speed up link generation.
getQueryInfo()
Subclasses return an SQL query here, formatted as an array with the following keys: tables => Table(s...
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
isExpensive()
Should this query page only be updated offline on large wikis?
execute( $par)
Add the JS.
formatResult( $skin, $result)
sortDescending()
Override to sort by increasing values.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.
The shared interface for all language converters.