60 parent::__construct(
'Unwatchedpages',
'unwatchedpages' );
61 $this->linkBatchFactory = $linkBatchFactory;
81 if ( !$res->numRows() ) {
85 $batch = $this->linkBatchFactory->newLinkBatch();
86 foreach ( $res as $row ) {
87 $batch->add( $row->namespace, $row->title );
97 'tables' => [
'page',
'watchlist' ],
99 'namespace' =>
'page_namespace',
100 'title' =>
'page_title',
101 'value' =>
'page_namespace'
105 'page_is_redirect' => 0,
108 'join_conds' => [
'watchlist' => [
109 'LEFT JOIN', [
'wl_title = page_title',
110 'wl_namespace = page_namespace' ] ] ]
119 return [
'page_namespace',
'page_title' ];
127 parent::execute( $par );
128 $this->
getOutput()->addModules(
'mediawiki.special.unwatchedPages' );
138 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
140 return Html::element(
'span', [
'class' =>
'mw-invalidtitle' ],
141 Linker::getInvalidTitleDescription( $this->
getContext(), $result->namespace, $result->title ) );
144 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
148 $plink = $linkRenderer->makeKnownLink( $nt,
new HtmlArmor( $text ) );
149 $wlink = $linkRenderer->makeKnownLink(
151 $this->
msg(
'watch' )->text(),
152 [
'class' =>
'mw-watch-link' ],
153 [
'action' =>
'watch' ]
156 return $this->
getLanguage()->specialList( $plink, $wlink );
160 return 'maintenance';
168class_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.
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.