dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "HTML escape parameter 'text' of hook 'SkinEditSectionLinks'"
[lhc/web/wiklou.git]
/
includes
/
skins
/
Skin.php
diff --git
a/includes/skins/Skin.php
b/includes/skins/Skin.php
index
7ac2927
..
a34e833
100644
(file)
--- 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();
*/
public function getDefaultModules() {
$out = $this->getOutput();
- $config = $this->getConfig();
$user = $this->getUser();
// Modules declared in the $modules literal are loaded
$user = $this->getUser();
// Modules declared in the $modules literal are loaded
@@
-756,7
+755,10
@@
abstract class Skin extends ContextSource {
return $subpages;
}
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 );
$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 ) {
* should fall back to the next notice in its sequence
*/
private function getCachedNotice( $name ) {
- $needParse = false;
$config = $this->getConfig();
if ( $name === 'default' ) {
$config = $this->getConfig();
if ( $name === 'default' ) {
@@
-1622,7
+1623,7
@@
abstract class Skin extends ContextSource {
$links = [
'editsection' => [
$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 ],
'targetTitle' => $nt,
'attribs' => $attribs,
'query' => [ 'action' => 'edit', 'section' => $section ],
@@
-1638,7
+1639,7
@@
abstract class Skin extends ContextSource {
foreach ( $links as $k => $linkDetails ) {
$linksHtml[] = Linker::link(
$linkDetails['targetTitle'],
foreach ( $links as $k => $linkDetails ) {
$linksHtml[] = Linker::link(
$linkDetails['targetTitle'],
-
$linkDetails['text']
,
+
htmlspecialchars( $linkDetails['text'] )
,
$linkDetails['attribs'],
$linkDetails['query'],
$linkDetails['options']
$linkDetails['attribs'],
$linkDetails['query'],
$linkDetails['options']