Jump to content

Wikia code/includes/specials/SpecialStatistics.php

From mediawiki.org
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\specials\SpecialStatistics.php	2011-07-18 22:31:17.671875000 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\specials\SpecialStatistics.php	2011-08-17 15:28:16.317382800 +0100
@@ -24,7 +24,7 @@
 	
 	public function execute( $par ) {
 		global $wgOut, $wgRequest, $wgMessageCache, $wgMemc;
-		global $wgDisableCounters, $wgMiserMode;
+		global $wgDisableCounters, $wgMiserMode, $wgTitle;
 		$wgMessageCache->loadAllMessages();
 		
 		$this->setHeaders();
@@ -90,8 +90,13 @@
 
 		$text .= Xml::closeElement( 'table' );
 
+		/**
+		 * wikia, custom statistics
+		 */
+		wfRunHooks( "CustomSpecialStatistics", array( &$this, &$text ) );
+
 		# Customizable footer
-		$footer = wfMsgExt( 'statistics-footer', array('parseinline') );
+		$footer = wfMsgExt( 'statistics-footer', array('parseinline'), $wgTitle->getPrefixedDBkey() );
 		if( !wfEmptyMsg( 'statistics-footer', $footer ) && $footer != '' ) {
 			$text .= "\n" . $footer;
 		}
@@ -183,7 +188,7 @@
 						$wgLang->formatNum( ceil( $wgRCMaxAge / ( 3600 * 24 ) ) ) );
 	}
 	private function getGroupStats() {
-		global $wgGroupPermissions, $wgImplicitGroups, $wgLang, $wgUser;
+		global $wgGroupPermissions, $wgImplicitGroups, $wgLang, $wgUser, $wgWikiaGlobalUserGroups;
 		$sk = $wgUser->getSkin();
 		$text = '';
 		foreach( $wgGroupPermissions as $group => $permissions ) {
@@ -220,6 +225,10 @@
 			$classZero = '';
 			$countUsers = SiteStats::numberingroup( $groupname );
 			if( $countUsers == 0 ) {
+				if( is_array($wgWikiaGlobalUserGroups) && in_array( $groupname, $wgWikiaGlobalUserGroups) ) {
+					//rt#57322 hide our effective global groups
+					continue;
+				}
 				$classZero = ' statistics-group-zero';
 			}
 			$text .= $this->formatRow( $grouppage . ' ' . $grouplink,