55 parent::__construct(
'Unwatchedpages',
'unwatchedpages' );
56 $this->linkBatchFactory = $linkBatchFactory;
76 if ( !$res->numRows() ) {
80 $batch = $this->linkBatchFactory->newLinkBatch()->setCaller( __METHOD__ );
81 foreach ( $res as $row ) {
82 $batch->add( $row->namespace, $row->title );
92 'tables' => [
'page',
'watchlist' ],
94 'namespace' =>
'page_namespace',
95 'title' =>
'page_title',
96 'value' =>
'page_namespace'
100 'page_is_redirect' => 0,
103 'join_conds' => [
'watchlist' => [
104 'LEFT JOIN', [
'wl_title = page_title',
105 'wl_namespace = page_namespace' ] ] ]
114 return [
'page_namespace',
'page_title' ];
122 parent::execute( $par );
123 $this->
getOutput()->addModules(
'mediawiki.special.unwatchedPages' );
133 $nt = Title::makeTitleSafe( $result->namespace, $result->title );
135 return Html::element(
'span', [
'class' =>
'mw-invalidtitle' ],
136 Linker::getInvalidTitleDescription( $this->
getContext(), $result->namespace, $result->title ) );
139 $text = $this->languageConverter->convertHtml( $nt->getPrefixedText() );
143 $plink = $linkRenderer->makeKnownLink( $nt,
new HtmlArmor( $text ) );
144 $wlink = $linkRenderer->makeKnownLink(
146 $this->
msg(
'watch' )->text(),
147 [
'class' =>
'mw-watch-link' ],
148 [
'action' =>
'watch' ]
151 return $this->
getLanguage()->specialList( $plink, $wlink );
155 return 'maintenance';
163class_alias( SpecialUnwatchedPages::class,
'SpecialUnwatchedPages' );
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.