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 "skins: Remove 'usemsgcache' and deprecate getDynamicStylesheetQuery"
[lhc/web/wiklou.git]
/
includes
/
skins
/
Skin.php
diff --git
a/includes/skins/Skin.php
b/includes/skins/Skin.php
index
69168c6
..
ed4045d
100644
(file)
--- a/
includes/skins/Skin.php
+++ b/
includes/skins/Skin.php
@@
-414,17
+414,13
@@
abstract class Skin extends ContextSource {
/**
* Get the query to generate a dynamic stylesheet
*
/**
* Get the query to generate a dynamic stylesheet
*
+ * @deprecated since 1.32 Use action=raw&ctype=text/css directly.
* @return array
*/
public static function getDynamicStylesheetQuery() {
* @return array
*/
public static function getDynamicStylesheetQuery() {
- global $wgSquidMaxage;
-
return [
'action' => 'raw',
return [
'action' => 'raw',
- 'maxage' => $wgSquidMaxage,
- 'usemsgcache' => 'yes',
'ctype' => 'text/css',
'ctype' => 'text/css',
- 'smaxage' => $wgSquidMaxage,
];
}
];
}
@@
-503,6
+499,10
@@
abstract class Skin extends ContextSource {
/**
* Whether the logo should be preloaded with an HTTP link header or not
/**
* Whether the logo should be preloaded with an HTTP link header or not
+ *
+ * @deprecated since 1.32 Redundant. It now happens automatically based on whether
+ * the skin loads a stylesheet based on ResourceLoaderSkinModule, which all
+ * skins that use wgLogo in CSS do, and other's would not.
* @since 1.29
* @return bool
*/
* @since 1.29
* @return bool
*/
@@
-533,7
+533,7
@@
abstract class Skin extends ContextSource {
$t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
$t = $embed . implode( "{$pop}{$embed}", $allCats['normal'] ) . $pop;
$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
- $linkPage =
wfMessage
( 'pagecategorieslink' )->inContentLanguage()->text();
+ $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">' .
$title = Title::newFromText( $linkPage );
$link = $title ? Linker::link( $title, $msg ) : $msg;
$s .= '<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
@@
-1331,7
+1331,7
@@
abstract class Skin extends ContextSource {
* @param string $message
*/
public function addToSidebar( &$bar, $message ) {
* @param string $message
*/
public function addToSidebar( &$bar, $message ) {
- $this->addToSidebarPlain( $bar,
wfMessage
( $message )->inContentLanguage()->plain() );
+ $this->addToSidebarPlain( $bar,
$this->msg
( $message )->inContentLanguage()->plain() );
}
/**
}
/**
@@
-1472,7
+1472,7
@@
abstract class Skin extends ContextSource {
$uTalkTitle,
$this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
[],
$uTalkTitle,
$this->msg( 'newmessageslinkplural' )->params( $plural )->escaped(),
[],
-
[ 'redirect' => 'no'
]
+
$uTalkTitle->isRedirect() ? [ 'redirect' => 'no' ] : [
]
);
$newMessagesDiffLink = Linker::linkKnown(
);
$newMessagesDiffLink = Linker::linkKnown(
@@
-1548,7
+1548,8
@@
abstract class Skin extends ContextSource {
$notice = $msg->plain();
}
$notice = $msg->plain();
}
- $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
+ $services = MediaWikiServices::getInstance();
+ $cache = $services->getMainWANObjectCache();
$parsed = $cache->getWithSetCallback(
// Use the extra hash appender to let eg SSL variants separately cache
// Key is verified with md5 hash of unparsed wikitext
$parsed = $cache->getWithSetCallback(
// Use the extra hash appender to let eg SSL variants separately cache
// Key is verified with md5 hash of unparsed wikitext
@@
-1560,7
+1561,7
@@
abstract class Skin extends ContextSource {
}
);
}
);
- $contLang =
MediaWikiServices::getInstance()
->getContentLanguage();
+ $contLang =
$services
->getContentLanguage();
return Html::rawElement(
'div',
[
return Html::rawElement(
'div',
[
@@
-1603,6
+1604,7
@@
abstract class Skin extends ContextSource {
/**
* Create a section edit link.
*
/**
* Create a section edit link.
*
+ * @suppress SecurityCheck-XSS $links has keys of different taint types
* @param Title $nt The title being linked to (may not be the same as
* the current page, if the section is included from a template)
* @param string $section The designation of the section being pointed to,
* @param Title $nt The title being linked to (may not be the same as
* the current page, if the section is included from a template)
* @param string $section The designation of the section being pointed to,
@@
-1620,13
+1622,13
@@
abstract class Skin extends ContextSource {
$attribs = [];
if ( !is_null( $tooltip ) ) {
$attribs = [];
if ( !is_null( $tooltip ) ) {
- $attribs['title'] =
wfMessage
( 'editsectionhint' )->rawParams( $tooltip )
+ $attribs['title'] =
$this->msg
( 'editsectionhint' )->rawParams( $tooltip )
->inLanguage( $lang )->text();
}
$links = [
'editsection' => [
->inLanguage( $lang )->text();
}
$links = [
'editsection' => [
- 'text' =>
wfMessage
( 'editsection' )->inLanguage( $lang )->escaped(),
+ 'text' =>
$this->msg
( 'editsection' )->inLanguage( $lang )->escaped(),
'targetTitle' => $nt,
'attribs' => $attribs,
'query' => [ 'action' => 'edit', 'section' => $section ],
'targetTitle' => $nt,
'attribs' => $attribs,
'query' => [ 'action' => 'edit', 'section' => $section ],
@@
-1651,7
+1653,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 )->escaped()
+ .
$this->msg
( 'pipe-separator' )->inLanguage( $lang )->escaped()
. '</span>',
$linksHtml
);
. '</span>',
$linksHtml
);