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 "Skin: Make skins aware of their registered skin name"
[lhc/web/wiklou.git]
/
includes
/
skins
/
Skin.php
diff --git
a/includes/skins/Skin.php
b/includes/skins/Skin.php
index
df7a9ed
..
07964a4
100644
(file)
--- a/
includes/skins/Skin.php
+++ b/
includes/skins/Skin.php
@@
-34,7
+34,11
@@
use MediaWiki\MediaWikiServices;
* @ingroup Skins
*/
abstract class Skin extends ContextSource {
* @ingroup Skins
*/
abstract class Skin extends ContextSource {
+ /**
+ * @var string|null
+ */
protected $skinname = null;
protected $skinname = null;
+
protected $mRelevantTitle = null;
protected $mRelevantUser = null;
protected $mRelevantTitle = null;
protected $mRelevantUser = null;
@@
-134,7
+138,17
@@
abstract class Skin extends ContextSource {
}
/**
}
/**
- * @return string Skin name
+ * @since 1.31
+ * @param string|null $skinname
+ */
+ public function __construct( $skinname = null ) {
+ if ( is_string( $skinname ) ) {
+ $this->skinname = $skinname;
+ }
+ }
+
+ /**
+ * @return string|null Skin name
*/
public function getSkinName() {
return $this->skinname;
*/
public function getSkinName() {
return $this->skinname;
@@
-1057,10
+1071,10
@@
abstract class Skin extends ContextSource {
$targetUser = User::newFromId( $id );
}
$targetUser = User::newFromId( $id );
}
- # The sending user must have a confirmed email address and the
target
- # user must
have a confirmed email address and allow emails from users
.
- return $this->getUser()->canSendEmail()
&&
-
$targetUser->canReceiveEmail()
;
+ # The sending user must have a confirmed email address and the
receiving
+ # user must
accept emails from the sender
.
+ return $this->getUser()->canSendEmail()
+
&& SpecialEmailUser::validateTarget( $targetUser, $this->getUser() ) === ''
;
}
/**
}
/**
@@
-1095,7
+1109,7
@@
abstract class Skin extends ContextSource {
$title = Title::newMainPage();
self::checkTitle( $title, '' );
$title = Title::newMainPage();
self::checkTitle( $title, '' );
- return $title->getL
ocal
URL( $urlaction );
+ return $title->getL
ink
URL( $urlaction );
}
/**
}
/**
@@
-1578,8
+1592,6
@@
abstract class Skin extends ContextSource {
$attribs = [];
if ( !is_null( $tooltip ) ) {
$attribs = [];
if ( !is_null( $tooltip ) ) {
- # T27462: undo double-escaping.
- $tooltip = Sanitizer::decodeCharReferences( $tooltip );
$attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
->inLanguage( $lang )->text();
}
$attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
->inLanguage( $lang )->text();
}
@@
-1611,7
+1623,7
@@
abstract class Skin extends ContextSource {
$result .= implode(
'<span class="mw-editsection-divider">'
$result .= implode(
'<span class="mw-editsection-divider">'
- . wfMessage( 'pipe-separator' )->inLanguage( $lang )->
text
()
+ . wfMessage( 'pipe-separator' )->inLanguage( $lang )->
escaped
()
. '</span>',
$linksHtml
);
. '</span>',
$linksHtml
);