*/
$wgUseTagFilter = true;
+/**
+ * If set to an integer, pages that are watched by more users than this
+ * threshold will not require the unwatchedpages permission to view the
+ * number of watchers.
+ */
+$wgUnwatchedPageThreshold = false;
+
/** @} */ # end RC/watchlist }
/************************************************************************//**
* @return array
*/
protected function pageInfo() {
- global $wgContLang, $wgRCMaxAge, $wgMemc;
+ global $wgContLang, $wgRCMaxAge, $wgMemc, $wgUnwatchedPageThreshold;
$user = $this->getUser();
$lang = $this->getLanguage();
);
}
- if ( $user->isAllowed( 'unwatchedpages' ) ) {
+ if (
+ $user->isAllowed( 'unwatchedpages' ) ||
+ ( $wgUnwatchedPageThreshold !== false &&
+ $pageCounts['watchers'] >= $wgUnwatchedPageThreshold )
+ ) {
// Number of page watchers
$pageInfo['header-basic'][] = array(
$this->msg( 'pageinfo-watchers' ), $lang->formatNum( $pageCounts['watchers'] )