mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-28 08:00:32 +00:00
Merge "Replace Action::getActionName by IContextSource::getActionName"
This commit is contained in:
commit
cd2fe930fb
|
@ -20,7 +20,6 @@
|
||||||
|
|
||||||
namespace MediaWiki\Minerva\Skins;
|
namespace MediaWiki\Minerva\Skins;
|
||||||
|
|
||||||
use Action;
|
|
||||||
use ExtensionRegistry;
|
use ExtensionRegistry;
|
||||||
use Html;
|
use Html;
|
||||||
use Language;
|
use Language;
|
||||||
|
@ -36,7 +35,6 @@ use MWException;
|
||||||
use MWTimestamp;
|
use MWTimestamp;
|
||||||
use ParserOptions;
|
use ParserOptions;
|
||||||
use ParserOutput;
|
use ParserOutput;
|
||||||
use RequestContext;
|
|
||||||
use RuntimeException;
|
use RuntimeException;
|
||||||
use SkinMustache;
|
use SkinMustache;
|
||||||
use SkinTemplate;
|
use SkinTemplate;
|
||||||
|
@ -101,7 +99,7 @@ class SkinMinerva extends SkinMustache {
|
||||||
private function hasPageActions() {
|
private function hasPageActions() {
|
||||||
$title = $this->getTitle();
|
$title = $this->getTitle();
|
||||||
return !$title->isSpecialPage() && !$title->isMainPage() &&
|
return !$title->isSpecialPage() && !$title->isMainPage() &&
|
||||||
Action::getActionName( $this->getContext() ) === 'view';
|
$this->getContext()->getActionName() === 'view';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -565,7 +563,7 @@ class SkinMinerva extends SkinMustache {
|
||||||
*/
|
*/
|
||||||
protected function getHistoryLink( Title $title ) {
|
protected function getHistoryLink( Title $title ) {
|
||||||
if ( !$title->exists() ||
|
if ( !$title->exists() ||
|
||||||
Action::getActionName( RequestContext::getMain() ) !== 'view'
|
$this->getContext()->getActionName() !== 'view'
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -700,7 +698,7 @@ class SkinMinerva extends SkinMustache {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $title->isTalkPage() && Action::getActionName( $this->getContext() ) === "view";
|
return $title->isTalkPage() && $this->getContext()->getActionName() === "view";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -920,7 +918,7 @@ class SkinMinerva extends SkinMustache {
|
||||||
// in order to enable toggling of the
|
// in order to enable toggling of the
|
||||||
// filters. Long term this won't be necessary when T111565 is resolved and a
|
// filters. Long term this won't be necessary when T111565 is resolved and a
|
||||||
// more general solution can be used.
|
// more general solution can be used.
|
||||||
if ( Action::getActionName( $this->getContext() ) !== 'history' ) {
|
if ( $this->getContext()->getActionName() !== 'history' ) {
|
||||||
// dequeue default content modules (toc, sortable, collapsible, etc.)
|
// dequeue default content modules (toc, sortable, collapsible, etc.)
|
||||||
$modules['content'] = array_diff( $modules['content'], [
|
$modules['content'] = array_diff( $modules['content'], [
|
||||||
// T233340
|
// T233340
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
"url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue",
|
"url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue",
|
||||||
"license-name": "GPL-2.0-or-later",
|
"license-name": "GPL-2.0-or-later",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">= 1.37.0"
|
"MediaWiki": ">= 1.38.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"MinervaDonateLink": {
|
"MinervaDonateLink": {
|
||||||
|
|
Loading…
Reference in a new issue