jenkins-bot has submitted this change and it was merged.
Change subject: Fix breakage from Ie33446a2
......................................................................
Fix breakage from Ie33446a2
LQT was relying on the presence of a 'watchlist' key on the personal URLs array.
With Ie33446a2 this would no longer occur if the user had no 'viewmywatchlist'
permission,
therefore the 'New messages' link would not appear at the top and a PHP Notice
would be generated.
Change-Id: Icb81016da76911599c092a93cea3558d49d5293d
---
M classes/Hooks.php
1 file changed, 5 insertions(+), 1 deletion(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/classes/Hooks.php b/classes/Hooks.php
index 60f9e72..b788d1c 100644
--- a/classes/Hooks.php
+++ b/classes/Hooks.php
@@ -487,7 +487,11 @@
$insertUrls = array( 'newmessages' => $newMessagesLink );
- $personal_urls = wfArrayInsertAfter( $personal_urls,
$insertUrls, 'watchlist' );
+ if ( in_array( 'watchlist', array_keys( $personal_urls ) ) ) {
// User has viewmywatchlist permission
+ $personal_urls = wfArrayInsertAfter( $personal_urls,
$insertUrls, 'watchlist' );
+ } else {
+ $personal_urls = wfArrayInsertAfter( $personal_urls,
$insertUrls, 'preferences' );
+ }
return true;
}
--
To view, visit https://gerrit.wikimedia.org/r/74569
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Icb81016da76911599c092a93cea3558d49d5293d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Anomie <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits