27 namespace MediaWiki\Specials;
63 parent::__construct(
'Unwatchedpages',
'unwatchedpages' );
64 $this->linkBatchFactory = $linkBatchFactory;
84 if ( !$res->numRows() ) {
88 $batch = $this->linkBatchFactory->newLinkBatch();
89 foreach ( $res as $row ) {
90 $batch->add( $row->namespace, $row->title );
100 'tables' => [
'page',
'watchlist' ],
102 'namespace' =>
'page_namespace',
103 'title' =>
'page_title',
104 'value' =>
'page_namespace'
108 'page_is_redirect' => 0,
111 'join_conds' => [
'watchlist' => [
112 'LEFT JOIN', [
'wl_title = page_title',
113 'wl_namespace = page_namespace' ] ] ]
122 return [
'page_namespace',
'page_title' ];
130 parent::execute( $par );
131 $this->
getOutput()->addModules(
'mediawiki.special.unwatchedPages' );
143 return Html::element(
'span', [
'class' =>
'mw-invalidtitle' ],
147 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
151 $plink = $linkRenderer->makeKnownLink( $nt,
new HtmlArmor( $text ) );
152 $wlink = $linkRenderer->makeKnownLink(
154 $this->
msg(
'watch' )->text(),
155 [
'class' =>
'mw-watch-link' ],
156 [
'action' =>
'watch' ]
159 return $this->
getLanguage()->specialList( $plink, $wlink );
163 return 'maintenance';
171 class_alias( SpecialUnwatchedPages::class,
'SpecialUnwatchedPages' );
Marks HTML that shouldn't be escaped.
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.
A special page that displays a 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?
sortDescending()
Override to sort by increasing values.
getOrderFields()
Subclasses return an array of fields to order by here.
formatResult( $skin, $result)
preprocessResults( $db, $res)
Pre-cache page existence to speed up link generation.
__construct(LinkBatchFactory $linkBatchFactory, IConnectionProvider $dbProvider, LanguageConverterFactory $languageConverterFactory)
execute( $par)
Add the JS.
isSyndicated()
Sometimes we don't want to build rss / atom feeds.
The base class for all skins.
The shared interface for all language converters.