Ladsgroup has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/355045 )
Change subject: Show wtachlist feed instead of a-z if the user is an editor
......................................................................
Show wtachlist feed instead of a-z if the user is an editor
Per our discussion with Jon in the hackathon today
Bug: T88270
Change-Id: I5319ed7ff76b7d466ee63f16e1859d53cd8e7406
---
M extension.json
M includes/specials/SpecialMobileWatchlist.php
2 files changed, 11 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend
refs/changes/45/355045/1
diff --git a/extension.json b/extension.json
index b254664..1441b5b 100644
--- a/extension.json
+++ b/extension.json
@@ -1874,7 +1874,8 @@
"MFEnableManifest": true,
"MFManifestThemeColor": "#252525",
"MFManifestBackgroundColor": "#FFFFFF",
- "MFLogWrappedInfoboxes": true
+ "MFLogWrappedInfoboxes": true,
+ "MFWatchlistEditCountThreshold": 10
},
"manifest_version": 1
}
diff --git a/includes/specials/SpecialMobileWatchlist.php
b/includes/specials/SpecialMobileWatchlist.php
index 060f397..2e2b37a 100644
--- a/includes/specials/SpecialMobileWatchlist.php
+++ b/includes/specials/SpecialMobileWatchlist.php
@@ -54,6 +54,7 @@
* @param string $par parameter submitted as subpage
*/
function executeWhenAvailable( $par ) {
+ global $wgMFWatchlistEditCountThreshold;
// Anons don't get a watchlist
$this->requireLogin( 'mobile-frontend-watchlist-purpose' );
@@ -70,7 +71,14 @@
'mobile.pagesummary.styles',
] );
$req = $this->getRequest();
- $this->view = $req->getVal( 'watchlistview', 'a-z' );
+
+ # Show watchlist feed if that person is an editor
+ if ( $this->getUser()->getEditCount() >
$wgMFWatchlistEditCountThreshold ) {
+ $this->view = $req->getVal( 'watchlistview', 'feed' );
+ } else {
+ $this->view = $req->getVal( 'watchlistview', 'a-z' );
+ }
+
$this->filter = $req->getVal( 'filter', 'all' );
$this->fromPageTitle = Title::newFromText( $req->getVal(
'from', false ) );
--
To view, visit https://gerrit.wikimedia.org/r/355045
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5319ed7ff76b7d466ee63f16e1859d53cd8e7406
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits