mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 14:23:53 +00:00
Merge "Replace Action::getActionName by IContextSource::getActionName"
This commit is contained in:
commit
cd2fe930fb
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue