From: Federico Leva Date: Wed, 1 Jul 2015 12:27:55 +0000 (+0200) Subject: Account for unset visiting watchers X-Git-Tag: 1.31.0-rc.0~10909^2 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=6832094f6c37b6c42484e10c8b64cc78aebe44c4;p=lhc%2Fweb%2Fwiklou.git Account for unset visiting watchers Followup to 09a21c4af8dd53644edd31fe731638b60f91594a Now with `|| $user->isAllowed( 'unwatchedpages' )` we can enter line 337 without having any count to show. Change-Id: I6826e1c59899d2c8cbbc6d079874d0d583f8783a --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 6d43ec55b5..0c1a344864 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -328,7 +328,10 @@ class InfoAction extends FormlessAction { $this->msg( 'pageinfo-watchers' ), $lang->formatNum( $pageCounts['watchers'] ) ); - if ( $config->get( 'ShowUpdatedMarker' ) ) { + if ( + $config->get( 'ShowUpdatedMarker' ) && + isset( $pageCounts['visitingWatchers'] ) + ) { $minToDisclose = $config->get( 'UnwatchedPageSecret' ); if ( $pageCounts['visitingWatchers'] > $minToDisclose || $user->isAllowed( 'unwatchedpages' ) ) {