X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=86a1c4c94b5c96b149f6c788b66d75ec57d22a34;hp=7a2679e4c884235d753e767e873aafd9f50a35b6;hb=a9164f143a59a8d957a1d7f205715ac57fff3c8c;hpb=c4e35c216d4036cc7f19e499e214278d9572da52
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index 7a2679e4c8..86a1c4c94b 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -175,7 +175,6 @@ abstract class Skin extends ContextSource {
*/
public function getDefaultModules() {
$out = $this->getOutput();
- $config = $this->getConfig();
$user = $this->getUser();
// Modules declared in the $modules literal are loaded
@@ -530,14 +529,14 @@ abstract class Skin extends ContextSource {
$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 .= '
' .
- $link . $colon . '
' . '
';
+ $link . $colon . '';
}
# Hidden categories
@@ -552,7 +551,7 @@ abstract class Skin extends ContextSource {
$s .= "" .
$this->msg( 'hidden-categories' )->numParams( count( $allCats['hidden'] ) )->escaped() .
- $colon . '
' . $embed . implode( "{$pop}{$embed}", $allCats['hidden'] ) . $pop . '
' .
+ $colon . '
' . $embed . implode( $pop . $embed, $allCats['hidden'] ) . $pop . '
' .
'
';
}
@@ -719,7 +718,7 @@ abstract class Skin extends ContextSource {
$title = $this->getTitle();
if ( ( !$title->exists() || $action == 'history' ) &&
- $title->userCan( 'deletedhistory', $this->getUser() )
+ $title->quickUserCan( 'deletedhistory', $this->getUser() )
) {
$n = $title->isDeleted();
@@ -756,7 +755,10 @@ abstract class Skin extends ContextSource {
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 );
@@ -1525,7 +1527,6 @@ abstract class Skin extends ContextSource {
* should fall back to the next notice in its sequence
*/
private function getCachedNotice( $name ) {
- $needParse = false;
$config = $this->getConfig();
if ( $name === 'default' ) {
@@ -1622,11 +1623,10 @@ abstract class Skin extends ContextSource {
$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 ]
]
];
@@ -1636,12 +1636,11 @@ abstract class Skin extends ContextSource {
$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']
);
}