40 parent::__construct(
'Unwatchedpages',
'unwatchedpages' );
62 if ( !$res->numRows() ) {
66 $batch = $this->linkBatchFactory->newLinkBatch()->setCaller( __METHOD__ );
67 foreach ( $res as $row ) {
68 $batch->add( $row->namespace, $row->title );
79 'tables' => [
'page',
'watchlist' ],
81 'namespace' =>
'page_namespace',
82 'title' =>
'page_title',
83 'value' =>
'page_namespace'
87 'page_is_redirect' => 0,
90 'join_conds' => [
'watchlist' => [
91 'LEFT JOIN', [
'wl_title = page_title',
92 'wl_namespace = page_namespace' ] ] ]
103 return [
'page_namespace',
'page_title' ];
111 parent::execute( $par );
112 $this->
getOutput()->addModules(
'mediawiki.special.unwatchedPages' );
122 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
124 return Html::element(
'span', [
'class' =>
'mw-invalidtitle' ],
125 Linker::getInvalidTitleDescription( $this->
getContext(), $result->namespace, $result->title ) );
128 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
132 $plink = $linkRenderer->makeKnownLink( $nt,
new HtmlArmor( $text ) );
133 $wlink = $linkRenderer->makeKnownLink(
135 $this->
msg(
'watch' )->text(),
136 [
'class' =>
'mw-watch-link' ],
137 [
'action' =>
'watch' ]
140 return $this->
getLanguage()->specialList( $plink, $wlink );
145 return 'maintenance';
153class_alias( SpecialUnwatchedPages::class,
'SpecialUnwatchedPages' );
Factory for LinkBatch objects to batch query page metadata.
This is a class for doing query pages; since they're almost all the same, we factor out some of the f...
setDatabaseProvider(IConnectionProvider $databaseProvider)
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getContentLanguage()
Shortcut to get content language.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
List of pages that are not on anyone's watchlist.
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?If the query for this page is considere...
sortDescending()
Override to sort by increasing values.to override bool
__construct(private readonly LinkBatchFactory $linkBatchFactory, IConnectionProvider $dbProvider, LanguageConverterFactory $languageConverterFactory)
getOrderFields()
Subclasses return an array of fields to order by here.Don't append DESC to the field names,...
formatResult( $skin, $result)
preprocessResults( $db, $res)
Pre-cache page existence to speed up link generation.
execute( $par)
Add the JS.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.to override bool