jenkins-bot has submitted this change and it was merged.
Change subject: Add ss_active_users in SiteStats::isSane
......................................................................
Add ss_active_users in SiteStats::isSane
Also changed the array to the full row name, avoids unnecessary string
concat
Change-Id: Id8f1cb7035ae0058fb34a6c7bdf7bf9f6c740a69
---
M includes/SiteStats.php
1 file changed, 12 insertions(+), 8 deletions(-)
Approvals:
Aaron Schulz: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 02e1911..199c64f 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -226,20 +226,24 @@
* @return bool
*/
private static function isSane( $row ) {
- if (
- $row === false
+ if ( $row === false
|| $row->ss_total_pages < $row->ss_good_articles
|| $row->ss_total_edits < $row->ss_total_pages
+ || $row->ss_users < $row->ss_active_users
) {
return false;
}
// Now check for underflow/overflow
- foreach ( array( 'total_views', 'total_edits', 'good_articles',
- 'total_pages', 'users', 'images' ) as $member ) {
- if (
- $row->{"ss_$member"} > 2000000000
- || $row->{"ss_$member"} < 0
- ) {
+ foreach ( array(
+ 'ss_total_views',
+ 'ss_total_edits',
+ 'ss_good_articles',
+ 'ss_total_pages',
+ 'ss_users',
+ 'ss_active_users',
+ 'ss_images',
+ ) as $member ) {
+ if ( $row->$member > 2000000000 || $row->$member < 0 ) {
return false;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/65133
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id8f1cb7035ae0058fb34a6c7bdf7bf9f6c740a69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits