jenkins-bot has submitted this change and it was merged.
Change subject: Show "Not logged in" message
......................................................................
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
Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
(cherry picked from commit 26f3f8c7329eec51cdf86869dbbc05cbe754741a)
---
M VectorTemplate.php
1 file changed, 22 insertions(+), 0 deletions(-)
Approvals:
Bartosz Dziewoński: Looks good to me, approved
jenkins-bot: Verified
diff --git a/VectorTemplate.php b/VectorTemplate.php
index 5203926..7a02b36 100644
--- a/VectorTemplate.php
+++ b/VectorTemplate.php
@@ -499,10 +499,32 @@
<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>
--
To view, visit https://gerrit.wikimedia.org/r/289692
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic560d3fd4e9f6ad194e6ff928c8749084af311b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: REL1_27
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Edokter <[email protected]>
Gerrit-Reviewer: Foxtrott <[email protected]>
Gerrit-Reviewer: Jdlrobson <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits