Merge "Replace Action::getActionName by IContextSource::getActionName"

This commit is contained in:
jenkins-bot 2022-06-16 19:07:46 +00:00 committed by Gerrit Code Review
commit cd2fe930fb
2 changed files with 5 additions and 7 deletions

View file

@ -20,7 +20,6 @@
namespace MediaWiki\Minerva\Skins;
use Action;
use ExtensionRegistry;
use Html;
use Language;
@ -36,7 +35,6 @@ use MWException;
use MWTimestamp;
use ParserOptions;
use ParserOutput;
use RequestContext;
use RuntimeException;
use SkinMustache;
use SkinTemplate;
@ -101,7 +99,7 @@ class SkinMinerva extends SkinMustache {
private function hasPageActions() {
$title = $this->getTitle();
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 ) {
if ( !$title->exists() ||
Action::getActionName( RequestContext::getMain() ) !== 'view'
$this->getContext()->getActionName() !== 'view'
) {
return null;
}
@ -700,7 +698,7 @@ class SkinMinerva extends SkinMustache {
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
// filters. Long term this won't be necessary when T111565 is resolved and a
// 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.)
$modules['content'] = array_diff( $modules['content'], [
// T233340

View file

@ -22,7 +22,7 @@
"url": "https://www.mediawiki.org/wiki/Skin:MinervaNeue",
"license-name": "GPL-2.0-or-later",
"requires": {
"MediaWiki": ">= 1.37.0"
"MediaWiki": ">= 1.38.0"
},
"config": {
"MinervaDonateLink": {