mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-09-24 02:39:20 +00:00
Show "Not logged in" message
Show "Not logged in" message left or right (depending on language) of an anon user's personal tools in case general edit permission is given. The display of the message was previously done in MW core (SkinTemplate::buildPersonalUrls, introduced by I6f44e3e5d), which needs to be reverted first (done in I5cfa9b4e). Bug: T127758 Depends-on: I5cfa9b4e Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
This commit is contained in:
parent
a59fc835be
commit
26f3f8c732
|
@ -499,10 +499,32 @@ class VectorTemplate extends BaseTemplate {
|
|||
<h3 id="p-personal-label"><?php $this->msg( 'personaltools' ) ?></h3>
|
||||
<ul<?php $this->html( 'userlangattributes' ) ?>>
|
||||
<?php
|
||||
|
||||
$notLoggedIn = '';
|
||||
|
||||
if ( !$this->getSkin()->getUser()->isLoggedIn() &&
|
||||
User::groupHasPermission( '*', 'edit' ) ){
|
||||
|
||||
$notLoggedIn =
|
||||
Html::rawElement( 'li',
|
||||
[ 'id' => 'pt-anonuserpage' ],
|
||||
$this->getMsg( 'notloggedin' )->escaped()
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if ( !$this->data[ 'rtl' ] ) {
|
||||
echo $notLoggedIn;
|
||||
}
|
||||
|
||||
$personalTools = $this->getPersonalTools();
|
||||
foreach ( $personalTools as $key => $item ) {
|
||||
echo $this->makeListItem( $key, $item );
|
||||
}
|
||||
|
||||
if ( $this->data[ 'rtl' ] ) {
|
||||
echo $notLoggedIn;
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue