Remove ULS extension hack and anon placeholder code
The anon placeholder is now provided by core. The styles will remain to style it to suit Vector needs. This ULS hack is no longer needed as the extension is already using array plus operator which does set union, so it only appends the right-hand array to the left-hand array. Some string concatenation that prevented it from working correctly has now been resolved by Ice379cd in core. Bug: T263382 Change-Id: I5691529ab8c59f4053cff38ea6f7dd01c326c074
This commit is contained in:
parent
57e069ba81
commit
ef45378c01
|
@ -416,35 +416,7 @@ class SkinVector extends SkinMustache {
|
|||
$personalTools = self::getPersonalToolsForMakeListItem(
|
||||
$this->buildPersonalUrls()
|
||||
);
|
||||
$skin = $this;
|
||||
|
||||
// For logged out users Vector shows a "Not logged in message"
|
||||
// This should be upstreamed to core, with instructions for how to hide it for skins
|
||||
// that do not want it.
|
||||
// For now we create a dedicated list item to avoid having to sync the API internals
|
||||
// of makeListItem.
|
||||
if ( !$skin->getUser()->isLoggedIn() && User::groupHasPermission( '*', 'edit' ) ) {
|
||||
$loggedIn =
|
||||
Html::element( 'li',
|
||||
[ 'id' => 'pt-anonuserpage' ],
|
||||
$skin->msg( 'notloggedin' )->text()
|
||||
);
|
||||
} else {
|
||||
$loggedIn = '';
|
||||
}
|
||||
|
||||
// This code doesn't belong here, it belongs in the UniversalLanguageSelector
|
||||
// It is here to workaround the fact that it wants to be the first item in the personal menus.
|
||||
if ( array_key_exists( 'uls', $personalTools ) ) {
|
||||
$uls = $skin->makeListItem( 'uls', $personalTools[ 'uls' ] );
|
||||
unset( $personalTools[ 'uls' ] );
|
||||
} else {
|
||||
$uls = '';
|
||||
}
|
||||
|
||||
$ptools = $this->getMenuData( 'personal', $personalTools );
|
||||
// Append additional link items if present.
|
||||
$ptools['html-items'] = $uls . $loggedIn . $ptools['html-items'];
|
||||
|
||||
return [
|
||||
'data-personal-menu' => $ptools,
|
||||
|
|
Loading…
Reference in New Issue