mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 07:43:47 +00:00
Merge "Prepare Vector for temporary user accounts"
This commit is contained in:
commit
125a8641e5
|
@ -222,11 +222,17 @@ class Hooks {
|
||||||
*/
|
*/
|
||||||
private static function updateUserLinksDropdownItems( $sk, &$content_navigation ) {
|
private static function updateUserLinksDropdownItems( $sk, &$content_navigation ) {
|
||||||
// For logged-in users in modern Vector, rearrange some links in the personal toolbar.
|
// For logged-in users in modern Vector, rearrange some links in the personal toolbar.
|
||||||
if ( $sk->getUser()->isRegistered() ) {
|
$user = $sk->getUser();
|
||||||
|
if ( $user->isRegistered() ) {
|
||||||
// Remove user page from personal menu dropdown for logged in use
|
// Remove user page from personal menu dropdown for logged in use
|
||||||
self::makeMenuItemCollapsible(
|
// Note we need to check for userpage, as a registered user in
|
||||||
$content_navigation['user-menu']['userpage']
|
// future may be an anonymous user who has been assigned a temporary
|
||||||
);
|
// account.
|
||||||
|
if ( isset( $content_navigation['user-menu']['userpage'] ) ) {
|
||||||
|
self::makeMenuItemCollapsible(
|
||||||
|
$content_navigation['user-menu']['userpage']
|
||||||
|
);
|
||||||
|
}
|
||||||
// watchlist may be disabled if $wgGroupPermissions['*']['viewmywatchlist'] = false;
|
// watchlist may be disabled if $wgGroupPermissions['*']['viewmywatchlist'] = false;
|
||||||
// See [[phab:T299671]]
|
// See [[phab:T299671]]
|
||||||
if ( isset( $content_navigation['user-menu']['watchlist'] ) ) {
|
if ( isset( $content_navigation['user-menu']['watchlist'] ) ) {
|
||||||
|
|
Loading…
Reference in a new issue