*/
public function getDefaultModules() {
$out = $this->getOutput();
- $config = $this->getConfig();
$user = $this->getUser();
// Modules declared in the $modules literal are loaded
$colon = $this->msg( 'colon-separator' )->escaped();
if ( !empty( $allCats['normal'] ) ) {
- $t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
+ $t = $embed . implode( $pop . $embed, $allCats['normal'] ) . $pop;
$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
$linkPage = $this->msg( 'pagecategorieslink' )->inContentLanguage()->text();
$title = Title::newFromText( $linkPage );
$link = $title ? Linker::link( $title, $msg ) : $msg;
$s .= '<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
- $link . $colon . '<ul>' . $t . '</ul>' . '</div>';
+ $link . $colon . '<ul>' . $t . '</ul></div>';
}
# Hidden categories
$s .= "<div id=\"mw-hidden-catlinks\" class=\"mw-hidden-catlinks$class\">" .
$this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
- $colon . '<ul>' . $embed . implode( "{$pop}{$embed}", $allCats['hidden'] ) . $pop . '</ul>' .
+ $colon . '<ul>' . $embed . implode( $pop . $embed, $allCats['hidden'] ) . $pop . '</ul>' .
'</div>';
}
return $subpages;
}
- if ( $out->isArticle() && MWNamespace::hasSubpages( $title->getNamespace() ) ) {
+ if (
+ $out->isArticle() && MediaWikiServices::getInstance()->getNamespaceInfo()->
+ hasSubpages( $title->getNamespace() )
+ ) {
$ptext = $title->getPrefixedText();
if ( strpos( $ptext, '/' ) !== false ) {
$links = explode( '/', $ptext );
* should fall back to the next notice in its sequence
*/
private function getCachedNotice( $name ) {
- $needParse = false;
$config = $this->getConfig();
if ( $name === 'default' ) {
$links = [
'editsection' => [
- 'text' => $this->msg( 'editsection' )->inLanguage( $lang )->escaped(),
+ 'text' => $this->msg( 'editsection' )->inLanguage( $lang )->text(),
'targetTitle' => $nt,
'attribs' => $attribs,
- 'query' => [ 'action' => 'edit', 'section' => $section ],
- 'options' => [ 'noclasses', 'known' ]
+ 'query' => [ 'action' => 'edit', 'section' => $section ]
]
];
$linksHtml = [];
foreach ( $links as $k => $linkDetails ) {
- $linksHtml[] = Linker::link(
+ $linksHtml[] = Linker::linkKnown(
$linkDetails['targetTitle'],
- $linkDetails['text'],
+ htmlspecialchars( $linkDetails['text'] ),
$linkDetails['attribs'],
- $linkDetails['query'],
- $linkDetails['options']
+ $linkDetails['query']
);
}