mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 14:23:53 +00:00
Hygiene: remove deprecated calls from Menu system
Changes: - Title::getTalkPage() is deprecated, use NamespaceInfo instead - Http::isValidURI is deprecated, use MWHttpRequest instead Change-Id: I6938fe93d18372ef855f398a506c8b5ba68b640e
This commit is contained in:
parent
d8de612e0c
commit
3b13e6b9f6
|
@ -30,6 +30,7 @@ use MediaWiki\Minerva\Menu\Entries\SingleMenuEntry;
|
|||
use Message;
|
||||
use MinervaUI;
|
||||
use MWException;
|
||||
use MWHttpRequest;
|
||||
use SpecialMobileWatchlist;
|
||||
use SpecialPage;
|
||||
use Title;
|
||||
|
@ -302,7 +303,7 @@ final class Definitions {
|
|||
}
|
||||
$inContentLang = $message->inContentLanguage();
|
||||
$titleName = $inContentLang->plain();
|
||||
if ( $inContentLang->isDisabled() || \Http::isValidURI( $titleName ) ) {
|
||||
if ( $inContentLang->isDisabled() || MWHttpRequest::isValidURI( $titleName ) ) {
|
||||
return;
|
||||
}
|
||||
$title = Title::newFromText( $titleName );
|
||||
|
|
|
@ -68,15 +68,17 @@ final class AdvancedUserMenuBuilder implements IUserMenuBuilder {
|
|||
public function getGroup( array $personalTools ): Group {
|
||||
$group = new Group();
|
||||
$group->insertEntry( new ProfileMenuEntry( $this->user ) );
|
||||
$group->insertEntry( new SingleMenuEntry(
|
||||
'userTalk',
|
||||
$this->messageLocalizer->msg( 'mobile-frontend-user-page-talk' )->escaped(),
|
||||
$this->user->getUserPage()->getTalkPage()->getLocalURL(),
|
||||
true,
|
||||
null,
|
||||
'before',
|
||||
'wikimedia-ui-userTalk-base20'
|
||||
) );
|
||||
$talkPage = $this->user->getUserPage()->getTalkPageIfDefined();
|
||||
if ( $talkPage ) {
|
||||
$group->insertEntry( new SingleMenuEntry( 'userTalk',
|
||||
$this->messageLocalizer->msg( 'mobile-frontend-user-page-talk' )->escaped(),
|
||||
$talkPage->getLocalURL(),
|
||||
true,
|
||||
null,
|
||||
'before',
|
||||
'wikimedia-ui-userTalk-base20'
|
||||
) );
|
||||
}
|
||||
$sandbox = $personalTools['sandbox']['links'][0] ?? false;
|
||||
|
||||
if ( $sandbox ) {
|
||||
|
|
Loading…
Reference in a new issue