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: I7001e311a8d5ed70129500ab1a3e99369d4a1d9d
This commit is contained in:
Stephan Gambke 2016-02-24 22:06:38 +01:00 committed by Jdlrobson
parent b704e57d21
commit 762b25a551

View file

@ -119,7 +119,17 @@ class MonoBookTemplate extends BaseTemplate {
<div class="pBody"> <div class="pBody">
<ul<?php $this->html( 'userlangattributes' ) ?>> <ul<?php $this->html( 'userlangattributes' ) ?>>
<?php foreach ( $this->getPersonalTools() as $key => $item ) { ?> <?php
if ( !$this->getSkin()->getUser()->isLoggedIn() &&
User::groupHasPermission( '*', 'edit' ) ) {
echo Html::rawElement( 'li', array(
'id' => 'pt-anonuserpage'
), $this->getMsg( 'notloggedin' )->escaped() );
}
foreach ( $this->getPersonalTools() as $key => $item ) { ?>
<?php echo $this->makeListItem( $key, $item ); ?> <?php echo $this->makeListItem( $key, $item ); ?>
<?php <?php