Aude has submitted this change and it was merged.
Change subject: Use the watchlist options given by the hook
......................................................................
Use the watchlist options given by the hook
instead of extracting them from wgRequest and wgUser
(Requires I688ab0b35b301f180bbfde3ad3043b1ee602de10)
Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
---
M client/WikibaseClient.hooks.php
1 file changed, 3 insertions(+), 2 deletions(-)
Approvals:
Aude: Verified; Looks good to me, approved
jenkins-bot: Checked
diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 21badcf..a372bab 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -469,10 +469,11 @@
* @param array &$tables
* @param array &$join_conds
* @param array &$fields
+ * @param array $values
*
* @return bool
*/
- public static function onSpecialWatchlistQuery( array &$conds, array
&$tables, array &$join_conds, array &$fields ) {
+ public static function onSpecialWatchlistQuery( array &$conds, array
&$tables, array &$join_conds, array &$fields, array $values ) {
global $wgRequest, $wgUser;
wfProfileIn( __METHOD__ );
@@ -481,7 +482,7 @@
// Don't act on activated enhanced watchlist
$wgRequest->getBool( 'enhanced', $wgUser->getOption(
'usenewrc' ) ) === false &&
// Or in case the user disabled it
- $wgRequest->getBool( 'hideWikibase',
!$wgUser->getOption( 'wlshowwikibase' ) ) === false
+ $values['hideWikibase'] === 0
) {
$dbr = wfGetDB( DB_SLAVE );
--
To view, visit https://gerrit.wikimedia.org/r/54147
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e27df0528f1ca94043bb8cb6229894839da235e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits