Consult "shouldUseSpecialHistory" when making history page link
This avoids an unnecessary redirect in mobile for AMC users. Bug: T219874 Change-Id: I049045d44f6e45ebb2c81f90aac4bb20831890df
This commit is contained in:
parent
f9ac8d40e5
commit
e836083ad1
|
@ -801,7 +801,8 @@ class SkinMinerva extends SkinTemplate {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getHistoryUrl( Title $title ) {
|
protected function getHistoryUrl( Title $title ) {
|
||||||
return SpecialPageFactory::exists( 'History' ) ?
|
return ExtensionRegistry::getInstance()->isLoaded( 'MobileFrontend' ) &&
|
||||||
|
SpecialMobileHistory::shouldUseSpecialHistory( $title, $this->getUser() ) ?
|
||||||
SpecialPage::getTitleFor( 'History', $title )->getLocalURL() :
|
SpecialPage::getTitleFor( 'History', $title )->getLocalURL() :
|
||||||
$title->getLocalURL( [ 'action' => 'history' ] );
|
$title->getLocalURL( [ 'action' => 'history' ] );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue